]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/traps_64.c
Merge branch 'x86/debug' into x86/cpu
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / traps_64.c
index 8b5b3b81d437e72f76a2a90cc6fd43089457a97e..7ffc8cff6cccf479eb20abbc25a8c554028896cf 100644 (file)
@@ -1130,7 +1130,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++;
 }