1

printk: Flush nbcon consoles first on panic

In console_flush_on_panic(), flush the nbcon consoles before
flushing legacy consoles. The legacy write() callbacks are not
fully safe when oops_in_progress is set.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240820063001.36405-26-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
John Ogness 2024-08-20 08:35:51 +02:06 committed by Petr Mladek
parent 8ba77712a7
commit d2e85ca7a7

View File

@ -3269,6 +3269,9 @@ void console_flush_on_panic(enum con_flush_mode mode)
if (mode == CONSOLE_REPLAY_ALL)
__console_rewind_all();
if (!have_boot_console)
nbcon_atomic_flush_pending();
console_flush_all(false, &next_seq, &handover);
}