[PATCH printk v3 00/40] reduce console_lock scope

2022-11-07 Thread John Ogness
This is v3 of a series to prepare for threaded/atomic printing. v2 is here [0]. This series focuses on reducing the scope of the BKL console_lock. It achieves this by switching to SRCU and a dedicated mutex for console list iteration and modification, respectively. The console_lock will no longer o

[PATCH printk v3 06/40] um: kmsg_dump: only dump when no output console available

2022-11-07 Thread John Ogness
The initial intention of the UML kmsg_dumper is to dump the kernel buffers to stdout if there is no console available to perform the regular crash output. However, if ttynull was registered as a console, no crash output was seen. Commit e23fe90dec28 ("um: kmsg_dumper: always dump when not tty cons

[PATCH printk v3 11/40] um: kmsg_dumper: use srcu console list iterator

2022-11-07 Thread John Ogness
Rather than using the console_lock to guarantee safe console list traversal, use srcu console list iteration. Signed-off-by: John Ogness --- arch/um/kernel/kmsg_dump.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel/kmsg

[PATCH printk v3 09/40] um: kmsg_dump: use console_is_enabled()

2022-11-07 Thread John Ogness
Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). Signed-off-by: John Ogness --- arch/um/kernel/kmsg_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel/kmsg_dump.c index 40abf1e9ccb1..f0233e2f8de0 100644 --