X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=arch%2Fx86%2Fkernel%2Ftraps.c;h=ac7d5275f6e8eaa9649a7776f9adbf1034a7fa4e;hb=304bceda6a18ae0b0240b8aac9a6bdf8ce2d2469;hp=b481341c9369da649908b57c3e8c39b1586b0111;hpb=9c6ff8bbb69a4e7b47ac40bfa44509296e89c5c0;p=mirror_ubuntu-artful-kernel.git diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index b481341c9369..ac7d5275f6e8 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c @@ -613,11 +613,12 @@ void math_state_restore(void) } __thread_fpu_begin(tsk); + /* * Paranoid restore. send a SIGSEGV if we fail to restore the state. */ if (unlikely(restore_fpu_checking(tsk))) { - __thread_fpu_end(tsk); + drop_init_fpu(tsk); force_sig(SIGSEGV, tsk); return; } @@ -629,6 +630,8 @@ EXPORT_SYMBOL_GPL(math_state_restore); dotraplinkage void __kprobes do_device_not_available(struct pt_regs *regs, long error_code) { + BUG_ON(use_xsave()); + #ifdef CONFIG_MATH_EMULATION if (read_cr0() & X86_CR0_EM) { struct math_emu_info info = { };