Skip to content

Commit c415b3d

Browse files
ehabkostIngo Molnar
authored andcommitted
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent bb8dd27 commit c415b3d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kernel/reboot.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ static struct notifier_block crash_nmi_nb = {
577577
void nmi_shootdown_cpus(nmi_shootdown_cb callback)
578578
{
579579
unsigned long msecs;
580+
local_irq_disable();
580581

581582
/* Make a note of crashing cpu. Will be used in NMI callback.*/
582583
crashing_cpu = safe_smp_processor_id();

0 commit comments

Comments
 (0)