From: Eduardo Habkost Date: Wed, 12 Nov 2008 13:34:44 +0000 (-0200) Subject: x86: disable IRQs before doing anything on nmi_shootdown_cpus() X-Git-Tag: firefly_0821_release~16421^2~32^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c415b3dce30dfb41234e118662e8720f47343a4f;p=firefly-linux-kernel-4.4.55.git x86: disable IRQs before doing anything on nmi_shootdown_cpus() Impact: make nmi_shootdown_cpus() callable from preemptible context We need to know on which CPU we are running on, and we don't want to be preempted while doing this. Signed-off-by: Eduardo Habkost Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 17a41e055565..c3cd512484e5 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -577,6 +577,7 @@ static struct notifier_block crash_nmi_nb = { void nmi_shootdown_cpus(nmi_shootdown_cb callback) { unsigned long msecs; + local_irq_disable(); /* Make a note of crashing cpu. Will be used in NMI callback.*/ crashing_cpu = safe_smp_processor_id();