On Mon, Mar 26, 2012 at 03:07:18PM +0200, Cedric VINCENT wrote: > This reverts commit fd4bab10 "target-sh4: optimize exceptions": the > function cpu_restore_state() isn't expected to be called in user-mode, > as a consequence it isn't protected from race conditions. For > information, syscalls are exceptions on Linux/SH4. > > There were two possible fixes: either "tb_lock" is acquired/released > around the call to cpu_restore_state() [1] or the commit that > introduced this regression is reverted [2].
I will submit a new version of this patch where the commit fd4bab10 isn't reverted and the call to cpu_restore_state() is protected by tb_lock instead. Actually most of the SH4 FPU helpers may call cpu_restore_state() indirectly, this is the same problem as with helper_trapa(). Regards, Cédric.