printk: console_flush_on_panic: use srcu console list iterator
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 16 Nov 2022 16:21:31 +0000 (17:27 +0106)
committerPetr Mladek <pmladek@suse.com>
Fri, 2 Dec 2022 10:25:01 +0000 (11:25 +0100)
commit87f2e4b7d9e5c50756184b4f8d0b92680de61496
tree11258aabf266bf5614213aa675fe6252088e16ba
parentd792db6f6b902dad6b751dc2ef226fb4463efe62
printk: console_flush_on_panic: use srcu console list iterator

With SRCU it is now safe to traverse the console list, even if
the console_trylock() failed. However, overwriting console->seq
when console_trylock() failed is still an issue.

Switch to SRCU iteration and document remaining issue with
console->seq.

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/20221116162152.193147-20-john.ogness@linutronix.de
kernel/printk/printk.c