Skip to content

Commit ffd71da

Browse files
author
Ingo Molnar
committed
panic: decrease oops_in_progress only after having done the panic
Impact: eliminate secondary warnings during panic() We can panic() in a number of difficult, atomic contexts, hence we use bust_spinlocks(1) in panic() to increase oops_in_progress, which prevents various debug checks we have in place. But in practice this protection only covers the first few printk's done by panic() - it does not cover the later attempt to stop all other CPUs and kexec(). If a secondary warning triggers in one of those facilities that can make the panic message scroll off. So do bust_spinlocks(0) only much later in panic(). (which code is only reached if panic policy is relaxed that it can return after a warning message) Reported-by: Jan Beulich <jbeulich@novell.com> LKML-Reference: <49B91A7E.76E4.0078.0@novell.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent cd80a81 commit ffd71da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/panic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ NORET_TYPE void panic(const char * fmt, ...)
7777
#ifdef CONFIG_DEBUG_BUGVERBOSE
7878
dump_stack();
7979
#endif
80-
bust_spinlocks(0);
8180

8281
/*
8382
* If we have crashed and we have a crash kernel loaded let it handle
@@ -136,6 +135,7 @@ NORET_TYPE void panic(const char * fmt, ...)
136135
mdelay(1);
137136
i++;
138137
}
138+
bust_spinlocks(0);
139139
}
140140

141141
EXPORT_SYMBOL(panic);

0 commit comments

Comments
 (0)