Skip to content

Commit 4bdfa0d

Browse files
jognesspmladek
authored andcommitted
panic: Mark emergency section in oops
Mark an emergency section beginning with oops_enter() until the end of oops_exit(). In this section, every printk() call will attempt to directly flush to the consoles using the EMERGENCY priority. The very end of oops_exit() performs a kmsg_dump(). This is not included in the emergency section because it is another flushing mechanism that should occur after the consoles have flushed the oops messages. Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20240820063001.36405-34-john.ogness@linutronix.de Signed-off-by: Petr Mladek <pmladek@suse.com>
1 parent 4833794 commit 4bdfa0d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

kernel/panic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ bool oops_may_print(void)
685685
*/
686686
void oops_enter(void)
687687
{
688+
nbcon_cpu_emergency_enter();
688689
tracing_off();
689690
/* can't trust the integrity of the kernel anymore: */
690691
debug_locks_off();
@@ -707,6 +708,7 @@ void oops_exit(void)
707708
{
708709
do_oops_enter_exit();
709710
print_oops_end_marker();
711+
nbcon_cpu_emergency_exit();
710712
kmsg_dump(KMSG_DUMP_OOPS);
711713
}
712714

0 commit comments

Comments
 (0)