x86/traps: die() instead of panicking on a double fault
authorAndy Lutomirski <luto@kernel.org>
Tue, 26 Nov 2019 06:37:44 +0000 (22:37 -0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 26 Nov 2019 21:00:12 +0000 (22:00 +0100)
A double fault has a decent chance of being recoverable by killing
the offending thread.  Use die() so that we at least try to recover.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/traps.c

index a9b16c3a933dadbe48da5141a1560f72bca28fe1..05da6b5b167bc4f72211f9fa98bd19f9aaf1dde2 100644 (file)
@@ -427,7 +427,7 @@ dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code, unsign
 #endif
 
        pr_emerg("PANIC: double fault, error_code: 0x%lx\n", error_code);
-       show_regs(regs);
+       die("double fault", regs, error_code);
        panic("Machine halted.");
 }
 #endif