From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 2 of 7] KEXEC BUG: nmi_shootdown_cpus doesn't look after the interrupt flag [Reformatted] Date: Wed, 15 Jun 2011 12:01:09 +0100 Message-ID: <4DF890F5.9090304@citrix.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050405080900040601000808" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "xen-devel@lists.xensource.com" , Jan Beulich List-Id: xen-devel@lists.xenproject.org --------------050405080900040601000808 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Reformatted as per Keir's suggestion. ~Andrew --------------050405080900040601000808 Content-Type: text/x-patch; name="kexec-fix-interrupts.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kexec-fix-interrupts.patch" KEXEC BUG: nmi_shootdown_cpus doesn't look after the interrupt flag 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 diff -r a6f5c3a474e3 xen/arch/x86/crash.c --- a/xen/arch/x86/crash.c Wed Jun 15 11:47:12 2011 +0100 +++ b/xen/arch/x86/crash.c Wed Jun 15 11:57:12 2011 +0100 @@ -57,7 +57,7 @@ static void nmi_shootdown_cpus(void) { unsigned long msecs; - local_irq_disable(); + BUG_ON(local_irq_is_enabled()); crashing_cpu = smp_processor_id(); local_irq_count(crashing_cpu) = 0; @@ -79,14 +79,14 @@ static void nmi_shootdown_cpus(void) __stop_this_cpu(); disable_IO_APIC(); - - local_irq_enable(); } void machine_crash_shutdown(void) { crash_xen_info_t *info; + local_irq_disable(); + nmi_shootdown_cpus(); info = kexec_crash_save_info(); --------------050405080900040601000808 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------050405080900040601000808--