OSDN Git Service

x86/debug: Handle early WARN_ONs proper
authorPeter Zijlstra <peterz@infradead.org>
Mon, 12 Jun 2017 11:52:46 +0000 (13:52 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 12 Jun 2017 19:17:48 +0000 (21:17 +0200)
commit8a524f803a3e0290cdba6d373361b2cef9752934
tree6de661f3898c330e2f7c418dae74e7363951d544
parent32c1431eea4881a6b17bd7c639315010aeefa452
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 <hdegoede@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Frank Mehnert <frank.mehnert@oracle.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Michael Thayer <michael.thayer@oracle.com>
Link: http://lkml.kernel.org/r/20170612180108.w4vgu2ckucmllf3a@hirez.programming.kicks-ass.net
arch/x86/include/asm/extable.h
arch/x86/kernel/traps.c
arch/x86/mm/extable.c