Skip to content

Commit e3da8db

Browse files
committed
Merge tag 'x86-core-2023-07-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Thomas Gleixner: "A single fix for the mechanism to park CPUs with an INIT IPI. On shutdown or kexec, the kernel tries to park the non-boot CPUs with an INIT IPI. But the same code path is also used by the crash utility. If the CPU which panics is not the boot CPU then it sends an INIT IPI to the boot CPU which resets the machine. Prevent this by validating that the CPU which runs the stop mechanism is the boot CPU. If not, leave the other CPUs in HLT" * tag 'x86-core-2023-07-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/smp: Don't send INIT to boot CPU
2 parents 74099e2 + b1472a6 commit e3da8db

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

arch/x86/kernel/smpboot.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,6 +1348,14 @@ bool smp_park_other_cpus_in_init(void)
13481348
if (apic->wakeup_secondary_cpu_64 || apic->wakeup_secondary_cpu)
13491349
return false;
13501350

1351+
/*
1352+
* If this is a crash stop which does not execute on the boot CPU,
1353+
* then this cannot use the INIT mechanism because INIT to the boot
1354+
* CPU will reset the machine.
1355+
*/
1356+
if (this_cpu)
1357+
return false;
1358+
13511359
for_each_present_cpu(cpu) {
13521360
if (cpu == this_cpu)
13531361
continue;

0 commit comments

Comments
 (0)