[RFC] panic: redundant backtraces with SYS_INFO_ALL_CPU_BT

From: Sergey Senozhatsky
Date: Wed Jul 23 2025 - 04:47:49 EST


Hello folks,

Should SYS_INFO_ALL_CPU_BT use trigger_allbutcpu_cpu_backtrace(),
instead of trigger_all_cpu_backtrace(), to exclude self/panic-cpu?
Otherwise it dumps extra backtraces for the panic CPU, which is
a little redundant (and confusing.)

E.g.
softlockup watchdog_timer_fn() calls dump_stack() from IRQ for the
locked-up CPU before it calls into panic() (assuming soft lockup panic),
which then can SYS_INFO_ALL_CPU_BT and trigger NMI backtraces for all CPUs,
including panic CPU which already dumped its stack, but this time we
dump_stack() from NMI.

I suspect it's a similar story for BUG()/BUG_ON() (and WARN/WARN_ON(),
assuming panic on warn.)