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 <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Petr Mladek <[email protected]>
1 parent 4833794 commit 4bdfa0d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)