Skip to content
Commit 750d4468 authored by John Ogness's avatar John Ogness Committed by Greg Kroah-Hartman
Browse files

panic: Flush kernel log buffer at the end

[ Upstream commit d988d9a9

 ]

If the kernel crashes in a context where printk() calls always
defer printing (such as in NMI or inside a printk_safe section)
then the final panic messages will be deferred to irq_work. But
if irq_work is not available, the messages will not get printed
unless explicitly flushed. The result is that the final
"end Kernel panic" banner does not get printed.

Add one final flush after the last printk() call to make sure
the final panic messages make it out as well.

Signed-off-by: default avatarJohn Ogness <john.ogness@linutronix.de>
Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240207134103.1357162-14-john.ogness@linutronix.de
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a2e14cc2
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