Re: [PATCH 3/3] x86, fpu: fix math_state_restore() race with kernel_fpu_begin()

2015-01-16 Thread Oleg Nesterov
On 01/15, Rik van Riel wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 01/15/2015 02:20 PM, Oleg Nesterov wrote: > > math_state_restore() can race with kernel_fpu_begin() if irq comes > > right after __thread_fpu_begin(), __save_init_fpu() will overwrite > > fpu->state we are goin

Re: [PATCH 3/3] x86, fpu: fix math_state_restore() race with kernel_fpu_begin()

2015-01-15 Thread Rik van Riel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/15/2015 02:20 PM, Oleg Nesterov wrote: > math_state_restore() can race with kernel_fpu_begin() if irq comes > right after __thread_fpu_begin(), __save_init_fpu() will overwrite > fpu->state we are going to restore. > > Add 2 simple helpers, ke