i387: make irq_fpu_usable() tests more robust
[~shefty/rdma-dev.git] / arch / x86 / kernel / traps.c
index 982433b5da30ec19aadd33978793ddcf2aac3e65..8ba27dbc107a1ccdf88f7da3a08f11aee1c1625e 100644 (file)
@@ -631,6 +631,7 @@ EXPORT_SYMBOL_GPL(math_state_restore);
 dotraplinkage void __kprobes
 do_device_not_available(struct pt_regs *regs, long error_code)
 {
+       WARN_ON_ONCE(!user_mode_vm(regs));
 #ifdef CONFIG_MATH_EMULATION
        if (read_cr0() & X86_CR0_EM) {
                struct math_emu_info info = { };