aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2008-11-12 08:34:44 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-12 12:55:49 -0500
commitc415b3dce30dfb41234e118662e8720f47343a4f (patch)
tree0bca0f5e8356c96c3f4de5898023a3ef0636057a
parentbb8dd270e62217e2d2172094c6c352c4ddc0a127 (diff)
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 <ehabkost@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/reboot.c1
1 files changed, 1 insertions, 0 deletions
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 = {
577void nmi_shootdown_cpus(nmi_shootdown_cb callback) 577void nmi_shootdown_cpus(nmi_shootdown_cb callback)
578{ 578{
579 unsigned long msecs; 579 unsigned long msecs;
580 local_irq_disable();
580 581
581 /* Make a note of crashing cpu. Will be used in NMI callback.*/ 582 /* Make a note of crashing cpu. Will be used in NMI callback.*/
582 crashing_cpu = safe_smp_processor_id(); 583 crashing_cpu = safe_smp_processor_id();