printk/panic: deduplicate backtrace on PANIC_PRINT_ALL_CPU_BT
PATCH 1/1 printk/panic: deduplicate backtrace on PANIC_PRINT_ALL_CPU_BT
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.
--- kernel/panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/panic.c +1 -1
@@ -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; }
Signature · 1 line
2.34.1
Quoted 10 lines · Kevin Mitchell
On panic, the backtrace of the panicking CPU will be printed either from within
panic()itself or by the oops handling. Previously, whenPANIC_PRINT_ALL_CPU_BTwas 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 <[email protected]>
Makes sense. The patch looks good to me.
Best Regards,
Petr
Quoted 5 lines · Kevin Mitchell
On panic, the backtrace of the panicking CPU will be printed either from within
panic()itself or by the oops handling. Previously, whenPANIC_PRINT_ALL_CPU_BTwas enabled, the backtrace of the panicking CPU would be printed again.
Quoted 8 lines
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 <[email protected]>--- kernel/panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makes total sense - thanks for the improvement!
Feel free to add my:
Cheers!