aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel/panic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-08-19 09:26:35 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-08-19 09:26:35 -0700
commitb0da640826ba3b6506b4996a6b23a429235e6923 (patch)
tree7f555acbdc20681a97f33c9676719bbd586bae5f /kernel/panic.c
parentLinux 6.11-rc4 (diff)
parentprintk/panic: Allow cpu backtraces to be written into ringbuffer during panic (diff)
downloadwireguard-linux-b0da640826ba3b6506b4996a6b23a429235e6923.tar.xz
wireguard-linux-b0da640826ba3b6506b4996a6b23a429235e6923.zip
Merge tag 'printk-for-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk fix from Petr Mladek: - Do not block printk on non-panic CPUs when they are dumping backtraces * tag 'printk-for-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk/panic: Allow cpu backtraces to be written into ringbuffer during panic
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index f861bedc1925..2a0449144f82 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -64,6 +64,8 @@ unsigned long panic_on_taint;
bool panic_on_taint_nousertaint = false;
static unsigned int warn_limit __read_mostly;
+bool panic_triggering_all_cpu_backtrace;
+
int panic_timeout = CONFIG_PANIC_TIMEOUT;
EXPORT_SYMBOL_GPL(panic_timeout);
@@ -253,8 +255,12 @@ void check_panic_on_warn(const char *origin)
*/
static void panic_other_cpus_shutdown(bool crash_kexec)
{
- if (panic_print & PANIC_PRINT_ALL_CPU_BT)
+ 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();
+ panic_triggering_all_cpu_backtrace = false;
+ }
/*
* Note that smp_send_stop() is the usual SMP shutdown function,