]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
printk/panic: Allow cpu backtraces to be written into ringbuffer during panic
authorRyo Takakura <takakura@valinux.co.jp>
Mon, 12 Aug 2024 07:27:03 +0000 (16:27 +0900)
committerPetr Mladek <pmladek@suse.com>
Tue, 13 Aug 2024 12:16:22 +0000 (14:16 +0200)
commitbcc954c6caba01fca143162d5fbb90e46aa1ad80
tree1753c205754918fdb84a270566df359ae6dc8cd5
parent8bf100092d60bf586bbc1a3a2cd833bb212d9d53
printk/panic: Allow cpu backtraces to be written into ringbuffer during panic

commit 779dbc2e78d7 ("printk: Avoid non-panic CPUs writing
to ringbuffer") disabled non-panic CPUs to further write messages to
ringbuffer after panicked.

Since the commit, non-panicked CPU's are not allowed to write to
ring buffer after panicked and CPU backtrace which is triggered
after panicked to sample non-panicked CPUs' backtrace no longer
serves its function as it has nothing to print.

Fix the issue by allowing non-panicked CPUs to write into ringbuffer
while CPU backtrace is in flight.

Fixes: 779dbc2e78d7 ("printk: Avoid non-panic CPUs writing to ringbuffer")
Signed-off-by: Ryo Takakura <takakura@valinux.co.jp>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240812072703.339690-1-takakura@valinux.co.jp
Signed-off-by: Petr Mladek <pmladek@suse.com>
include/linux/panic.h
kernel/panic.c
kernel/printk/printk.c