linux-stable/kernel/printk
John Ogness b2805b1bdd printk: wake waiters for safe and NMI contexts
[ Upstream commit 5341b93dea ]

When printk() is called from safe or NMI contexts, it will directly
store the record (vprintk_store()) and then defer the console output.
However, defer_console_output() only causes console printing and does
not wake any waiters of new records.

Wake waiters from defer_console_output() so that they also are aware
of the new records from safe and NMI contexts.

Fixes: 03fc7f9c99 ("printk/nmi: Prevent deadlock when accessing the main log buffer in NMI")
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220421212250.565456-6-john.ogness@linutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:25:42 +02:00
..
Makefile printk: move printk sysctl to printk/sysctl.c 2022-01-22 08:33:35 +02: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: avoid -Wsometimes-uninitialized warning 2021-10-04 10:28:43 +02:00
internal.h printk: fix build warning when CONFIG_PRINTK=n 2022-01-22 08:33:36 +02:00
printk.c printk: wake waiters for safe and NMI contexts 2022-06-09 10:25:42 +02: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
sysctl.c printk: Fix incorrect __user type in proc_dointvec_minmax_sysadmin() 2022-02-03 11:27:38 -08:00