aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-13 05:54:24 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-13 06:06:47 -0400
commitffd71da4e3f323b7673b061e6f7e0d0c12dc2b49 (patch)
treeedebe057b20e6684ab3dac06e53050595195fa63
parentcd80a8142efa3468c2cd9fb52845f334c3220d54 (diff)
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>
-rw-r--r--kernel/panic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index 32fe4eff1b89..57fb005de546 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -77,7 +77,6 @@ NORET_TYPE void panic(const char * fmt, ...)
77#ifdef CONFIG_DEBUG_BUGVERBOSE 77#ifdef CONFIG_DEBUG_BUGVERBOSE
78 dump_stack(); 78 dump_stack();
79#endif 79#endif
80 bust_spinlocks(0);
81 80
82 /* 81 /*
83 * If we have crashed and we have a crash kernel loaded let it handle 82 * 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, ...)
136 mdelay(1); 135 mdelay(1);
137 i++; 136 i++;
138 } 137 }
138 bust_spinlocks(0);
139} 139}
140 140
141EXPORT_SYMBOL(panic); 141EXPORT_SYMBOL(panic);