diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-07-09 20:08:38 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-07-09 20:08:38 +0300 |
commit | e3da8db05531829cf64f922491be6f052acc5fba (patch) | |
tree | 913790db060080aa2b9d7e231b4f60456a7ab067 /arch | |
parent | 74099e20348e84e62b5ea6ef270f91db48bc1352 (diff) | |
parent | b1472a60a584694875a05cf8bcba8bdf0dc1cd3a (diff) | |
download | linux-e3da8db05531829cf64f922491be6f052acc5fba.tar.xz |
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
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index ed2d51960a7d..e1aa2cd7734b 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1348,6 +1348,14 @@ bool smp_park_other_cpus_in_init(void) if (apic->wakeup_secondary_cpu_64 || apic->wakeup_secondary_cpu) return false; + /* + * If this is a crash stop which does not execute on the boot CPU, + * then this cannot use the INIT mechanism because INIT to the boot + * CPU will reset the machine. + */ + if (this_cpu) + return false; + for_each_present_cpu(cpu) { if (cpu == this_cpu) continue; |