linux-stable/kernel/printk
Nicholas Piggin c3b0ab956d printk: restore flushing of NMI buffers on remote CPUs after NMI backtraces
commit 5d5e4522a7 upstream.

printk from NMI context relies on irq work being raised on the local CPU
to print to console. This can be a problem if the NMI was raised by a
lockup detector to print lockup stack and regs, because the CPU may not
enable irqs (because it is locked up).

Introduce printk_trigger_flush() that can be called another CPU to try
to get those messages to the console, call that where printk_safe_flush
was previously called.

Fixes: 93d102f094 ("printk: remove safe buffers")
Cc: stable@vger.kernel.org # 5.15
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20211107045116.1754411-1-npiggin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-25 09:48:45 +01:00
..
braille.c printk: Replace strncmp() with str_has_prefix() 2019-08-16 09:54:08 +02:00
braille.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
console_cmdline.h printk: Fix preferred console selection with multiple matches 2020-02-18 09:34:42 +01:00
index.c printk/index: Fix -Wunused-function warning 2021-08-27 16:42:44 +02:00
internal.h Merge branch 'rework/printk_safe-removal' into for-linus 2021-08-30 16:36:10 +02:00
Makefile printk: Userspace format indexing support 2021-07-19 11:57:48 +02:00
printk.c printk: restore flushing of NMI buffers on remote CPUs after NMI backtraces 2021-11-25 09:48:45 +01:00
printk_ringbuffer.c Merge branch 'printk-rework' into for-linus 2021-01-21 16:06:21 +01:00
printk_ringbuffer.h printk: rectify kernel-doc for prb_rec_init_wr() 2021-01-26 11:17:51 +01:00
printk_safe.c printk: remove NMI tracking 2021-07-26 15:09:44 +02:00