File 25478-x86-unknown-NMI-deadlock.patch of Package xen.openSUSE_11.4_Update
# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1339423970 -3600
# Node ID 6d1a30dc47e8dfcb826ff14c833d694fd4e6afb2
# Parent e12e0b0382191af6adc5bc797951d84be874e16d
x86/nmi: Fix deadlock in unknown_nmi_error()
Additionally, correct the text description to reflect what is being
done, and make use of fatal_trap() in preference to kexec_crash() in
case an unknown NMI occurs before a kdump kernel has been loaded.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3099,7 +3099,7 @@ static void io_check_error(struct cpu_us
outb((inb(0x61) & 0x07) | 0x00, 0x61); /* enable IOCK */
}
-static void unknown_nmi_error(unsigned char reason)
+static void unknown_nmi_error(struct cpu_user_regs *regs, unsigned char reason)
{
switch ( opt_nmi[0] )
{
@@ -3108,10 +3108,10 @@ static void unknown_nmi_error(unsigned c
case 'i': /* 'ignore' */
break;
default: /* 'fatal' */
+ console_force_unlock();
printk("Uhhuh. NMI received for unknown reason %02x.\n", reason);
- printk("Dazed and confused, but trying to continue\n");
printk("Do you have a strange power saving mode enabled?\n");
- kexec_crash();
+ fatal_trap(TRAP_nmi, regs);
}
}
@@ -3144,7 +3144,7 @@ asmlinkage void do_nmi(struct cpu_user_r
else if ( reason & 0x40 )
io_check_error(regs);
else if ( !nmi_watchdog )
- unknown_nmi_error((unsigned char)(reason&0xff));
+ unknown_nmi_error(regs, (unsigned char)(reason&0xff));
}
}