diff options
author | John Ogness <john.ogness@linutronix.de> | 2024-02-07 14:41:03 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2024-02-07 17:23:19 +0100 |
commit | 7412dc6d55eed6b76180e40ac3601412ebde29bd (patch) | |
tree | 3cb98e9f442a2c06d0d8005248a3a9841730d5e7 /kernel/printk | |
parent | panic: Flush kernel log buffer at the end (diff) | |
download | linux-7412dc6d55eed6b76180e40ac3601412ebde29bd.tar.xz linux-7412dc6d55eed6b76180e40ac3601412ebde29bd.zip |
dump_stack: Do not get cpu_sync for panic CPU
dump_stack() is called in panic(). If for some reason another CPU
is holding the printk_cpu_sync and is unable to release it, the
panic CPU will be unable to continue and print the stacktrace.
Since non-panic CPUs are not allowed to store new printk messages
anyway, there is no need to synchronize the stacktrace output in
a panic situation.
For the panic CPU, do not get the printk_cpu_sync because it is
not needed and avoids a potential deadlock scenario in panic().
Link: https://lore.kernel.org/lkml/ZcIGKU8sxti38Kok@alley
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240207134103.1357162-15-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'kernel/printk')
-rw-r--r-- | kernel/printk/internal.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h index ac2d9750e5f8..6c2afee5ef62 100644 --- a/kernel/printk/internal.h +++ b/kernel/printk/internal.h @@ -130,7 +130,6 @@ struct printk_message { }; bool other_cpu_in_panic(void); -bool this_cpu_in_panic(void); bool printk_get_next_message(struct printk_message *pmsg, u64 seq, bool is_extended, bool may_supress); |