From: "Jan Beulich" Subject: Re: [PATCH 2 of 7] KEXEC BUG: nmi_shootdown_cpus doesn't look after the interrupt flag Date: Tue, 14 Jun 2011 09:46:38 +0100 Message-ID: <4DF73C0E0200007800046F65@nat28.tlf.novell.com> References: <1c3d2e4d06febe3443ac.1307984569@andrewcoop.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1c3d2e4d06febe3443ac.1307984569@andrewcoop.uk.xensource.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andrew Cooper Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> On 13.06.11 at 19:02, Andrew Cooper wrote: > 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. Can interrupts really be enabled when entering this function? > Therefore, use save/restore in preference to disable/enable. I.e. wouldn't just removing the stray local_irq_enable() suffice? Jan > Signed-off-by: Andrew Cooper >=20 > 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 > =20 > static void nmi_shootdown_cpus(void) > { > - unsigned long msecs; > + unsigned long msecs, flags; > =20 > - local_irq_disable(); > + local_irq_save(flags); > =20 > crashing_cpu =3D smp_processor_id(); > local_irq_count(crashing_cpu) =3D 0; > @@ -80,7 +80,7 @@ static void nmi_shootdown_cpus(void) > __stop_this_cpu(); > disable_IO_APIC(); > =20 > - local_irq_enable(); > + local_irq_restore(flags); > } > =20 > void machine_crash_shutdown(void) >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com=20 > http://lists.xensource.com/xen-devel=20