[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] x86/nmi: Fix deadlock in unknown_nmi_error()


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
  • Date: Wed, 04 Jul 2012 00:33:08 +0000
  • Delivery-date: Wed, 04 Jul 2012 00:34:23 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1341319772 -3600
# Node ID ce1b489f05436edd1285939c0c65157e5ef9fd96
# Parent  0b947d466e3ee99da43f5541da3d3de9f675b49a
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@xxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset:   25478:6d1a30dc47e8
xen-unstable date:        Mon Jun 11 15:12:50 2012 +0100
---


diff -r 0b947d466e3e -r ce1b489f0543 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Tue Jul 03 13:48:58 2012 +0100
+++ b/xen/arch/x86/traps.c      Tue Jul 03 13:49:32 2012 +0100
@@ -3225,7 +3225,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] )
     {
@@ -3234,10 +3234,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);
     }
 }
 
@@ -3270,7 +3270,7 @@ void do_nmi(struct cpu_user_regs *regs)
         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));
     }
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.