|
@@ -1131,7 +1131,14 @@ asmlinkage void math_state_restore(void)
|
|
|
}
|
|
|
|
|
|
clts(); /* Allow maths ops (or we recurse) */
|
|
|
- restore_fpu_checking(&me->thread.xstate->fxsave);
|
|
|
+ /*
|
|
|
+ * Paranoid restore. send a SIGSEGV if we fail to restore the state.
|
|
|
+ */
|
|
|
+ if (unlikely(restore_fpu_checking(&me->thread.xstate->fxsave))) {
|
|
|
+ stts();
|
|
|
+ force_sig(SIGSEGV, me);
|
|
|
+ return;
|
|
|
+ }
|
|
|
task_thread_info(me)->status |= TS_USEDFPU;
|
|
|
me->fpu_counter++;
|
|
|
}
|