Commit d2e85ca7 authored by John Ogness's avatar John Ogness Committed by Petr Mladek

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: default avatarJohn Ogness <john.ogness@linutronix.de>
Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240820063001.36405-26-john.ogness@linutronix.deSigned-off-by: default avatarPetr Mladek <pmladek@suse.com>
parent 8ba77712
...@@ -3269,6 +3269,9 @@ void console_flush_on_panic(enum con_flush_mode mode) ...@@ -3269,6 +3269,9 @@ void console_flush_on_panic(enum con_flush_mode mode)
if (mode == CONSOLE_REPLAY_ALL) if (mode == CONSOLE_REPLAY_ALL)
__console_rewind_all(); __console_rewind_all();
if (!have_boot_console)
nbcon_atomic_flush_pending();
console_flush_all(false, &next_seq, &handover); console_flush_all(false, &next_seq, &handover);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment