kernel/panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
On panic, the backtrace of the panicking CPU will be printed either from
within panic() itself or by the oops handling. Previously, when
PANIC_PRINT_ALL_CPU_BT was enabled, the backtrace of the panicking CPU
would be printed again.
To avoid cluttering up the crash log or console with this redundant
information, this commit omits the panicking CPU from the all-cpu
backtrace printed by panic_printk=PANIC_PRINT_ALL_CPU_BT.
Signed-off-by: Kevin Mitchell <kevmitch@arista.com>
---
kernel/panic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/panic.c b/kernel/panic.c
index a3889f38153d..e53b23449fcf 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -258,7 +258,7 @@ static void panic_other_cpus_shutdown(bool crash_kexec)
if (panic_print & PANIC_PRINT_ALL_CPU_BT) {
/* Temporary allow non-panic CPUs to write their backtraces. */
panic_triggering_all_cpu_backtrace = true;
- trigger_all_cpu_backtrace();
+ trigger_allbutcpu_cpu_backtrace(raw_smp_processor_id());
panic_triggering_all_cpu_backtrace = false;
}
--
2.34.1
On 23/04/2025 17:26, Kevin Mitchell wrote: > On panic, the backtrace of the panicking CPU will be printed either from > within panic() itself or by the oops handling. Previously, when > PANIC_PRINT_ALL_CPU_BT was enabled, the backtrace of the panicking CPU > would be printed again. > > To avoid cluttering up the crash log or console with this redundant > information, this commit omits the panicking CPU from the all-cpu > backtrace printed by panic_printk=PANIC_PRINT_ALL_CPU_BT. > > Signed-off-by: Kevin Mitchell <kevmitch@arista.com> > --- > kernel/panic.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Makes total sense - thanks for the improvement! Feel free to add my: Reviewed-by: Guilherme G. Piccoli <gpiccoli@igalia.com> Cheers!
On Wed 2025-04-23 13:26:17, Kevin Mitchell wrote: > On panic, the backtrace of the panicking CPU will be printed either from > within panic() itself or by the oops handling. Previously, when > PANIC_PRINT_ALL_CPU_BT was enabled, the backtrace of the panicking CPU > would be printed again. > > To avoid cluttering up the crash log or console with this redundant > information, this commit omits the panicking CPU from the all-cpu > backtrace printed by panic_printk=PANIC_PRINT_ALL_CPU_BT. > > Signed-off-by: Kevin Mitchell <kevmitch@arista.com> Makes sense. The patch looks good to me. Reviewed-by: Petr Mladek <pmladek@suse.com> Best Regards, Petr
© 2016 - 2026 Red Hat, Inc.