preempt_enable();
}
-static inline void stop_fpu_preload(struct task_struct *tsk)
-{
- tsk->fpu_counter = 0;
-}
-
static inline void drop_fpu(struct task_struct *tsk)
{
/*
* Forget coprocessor state..
*/
- stop_fpu_preload(tsk);
+ tsk->fpu_counter = 0;
preempt_disable();
__drop_fpu(tsk);
preempt_enable();
struct xsave_struct *xsave = &tsk->thread.fpu.state->xsave;
struct user_i387_ia32_struct env;
- stop_fpu_preload(tsk);
- unlazy_fpu(tsk);
+ drop_fpu(tsk);
if (__copy_from_user(xsave, buf_fx, state_size) ||
- __copy_from_user(&env, buf, sizeof(env))) {
- drop_fpu(tsk);
+ __copy_from_user(&env, buf, sizeof(env)))
return -1;
- }
sanitize_restored_xstate(tsk, &env, xstate_bv, fx_only);
+ set_used_math();
} else {
/*
* For 64-bit frames and 32-bit fsave frames, restore the user