WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2 of 7] KEXEC BUG: nmi_shootdown_cpus doesn't look af

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2 of 7] KEXEC BUG: nmi_shootdown_cpus doesn't look after the interrupt flag
From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Date: Mon, 13 Jun 2011 18:02:49 +0100
Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Delivery-date: Mon, 13 Jun 2011 10:07:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1307984567@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1307984567@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
nmi_shootdown_cpus is part of the kexec path, coming from a panic, and
as such can be called both with interrupts enabled or disabled. We
really dont want to accidentally set IF.

Therefore, use save/restore in preference to disable/enable.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

diff -r 076c3034c8c7 -r 1c3d2e4d06fe xen/arch/x86/crash.c
--- a/xen/arch/x86/crash.c      Mon Jun 13 17:45:43 2011 +0100
+++ b/xen/arch/x86/crash.c      Mon Jun 13 17:45:43 2011 +0100
@@ -55,9 +55,9 @@ static int crash_nmi_callback(struct cpu
 
 static void nmi_shootdown_cpus(void)
 {
-    unsigned long msecs;
+    unsigned long msecs, flags;
 
-    local_irq_disable();
+    local_irq_save(flags);
 
     crashing_cpu = smp_processor_id();
     local_irq_count(crashing_cpu) = 0;
@@ -80,7 +80,7 @@ static void nmi_shootdown_cpus(void)
     __stop_this_cpu();
     disable_IO_APIC();
 
-    local_irq_enable();
+    local_irq_restore(flags);
 }
 
 void machine_crash_shutdown(void)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel