|
@@ -788,18 +788,16 @@ void math_state_restore(void)
|
|
local_irq_disable();
|
|
local_irq_disable();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* Avoid __kernel_fpu_begin() right after __thread_fpu_begin() */
|
|
|
|
+ kernel_fpu_disable();
|
|
__thread_fpu_begin(tsk);
|
|
__thread_fpu_begin(tsk);
|
|
-
|
|
|
|
- /*
|
|
|
|
- * Paranoid restore. send a SIGSEGV if we fail to restore the state.
|
|
|
|
- */
|
|
|
|
if (unlikely(restore_fpu_checking(tsk))) {
|
|
if (unlikely(restore_fpu_checking(tsk))) {
|
|
drop_init_fpu(tsk);
|
|
drop_init_fpu(tsk);
|
|
force_sig_info(SIGSEGV, SEND_SIG_PRIV, tsk);
|
|
force_sig_info(SIGSEGV, SEND_SIG_PRIV, tsk);
|
|
- return;
|
|
|
|
|
|
+ } else {
|
|
|
|
+ tsk->thread.fpu_counter++;
|
|
}
|
|
}
|
|
-
|
|
|
|
- tsk->thread.fpu_counter++;
|
|
|
|
|
|
+ kernel_fpu_enable();
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(math_state_restore);
|
|
EXPORT_SYMBOL_GPL(math_state_restore);
|
|
|
|
|