aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/mm/extable.c
diff options
context:
space:
mode:
authorPeter Zijlstra <[email protected]>2017-06-12 13:52:46 +0200
committerThomas Gleixner <[email protected]>2017-06-12 21:17:48 +0200
commit8a524f803a3e0290cdba6d373361b2cef9752934 (patch)
tree6de661f3898c330e2f7c418dae74e7363951d544 /arch/x86/mm/extable.c
parent32c1431eea4881a6b17bd7c639315010aeefa452 (diff)
x86/debug: Handle early WARN_ONs proper
Hans managed to trigger a WARN very early in the boot which killed his (Virtual) box. The reason is that the recent rework of WARN() to use UD0 forgot to add the fixup_bug() call to early_fixup_exception(). As a result the kernel does not handle the WARN_ON injected UD0 exception and panics. Add the missing fixup call, so early UD's injected by WARN() get handled. Fixes: 9a93848fe787 ("x86/debug: Implement __WARN() using UD0") Reported-and-tested-by: Hans de Goede <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Frank Mehnert <[email protected]> Cc: Hans de Goede <[email protected]> Cc: Michael Thayer <[email protected]> Link: http://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'arch/x86/mm/extable.c')
-rw-r--r--arch/x86/mm/extable.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
index 35ea061010a1..0ea8afcb929c 100644
--- a/arch/x86/mm/extable.c
+++ b/arch/x86/mm/extable.c
@@ -162,6 +162,9 @@ void __init early_fixup_exception(struct pt_regs *regs, int trapnr)
if (fixup_exception(regs, trapnr))
return;
+ if (fixup_bug(regs, trapnr))
+ return;
+
fail:
early_printk("PANIC: early exception 0x%02x IP %lx:%lx error %lx cr2 0x%lx\n",
(unsigned)trapnr, (unsigned long)regs->cs, regs->ip,