x86: disable IRQs before doing anything on nmi_shootdown_cpus()
authorEduardo Habkost <ehabkost@redhat.com>
Wed, 12 Nov 2008 13:34:44 +0000 (11:34 -0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 12 Nov 2008 17:55:49 +0000 (18:55 +0100)
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 <ehabkost@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/reboot.c

index 17a41e055565586f57e2c0302afcf707597b5782..c3cd512484e58c0a1b7f108127297f751a7cd9ab 100644 (file)
@@ -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();