summaryrefslogtreecommitdiff
path: root/kernel/panic.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-12-19 11:03:18 +0100
committerThomas Gleixner <tglx@linutronix.de>2015-12-19 11:03:18 +0100
commitd267b8d6c65ed7636a412ca479b96df7c0f5b27b (patch)
treef613d83fab377bf3599eb9ffc3cdf34df0a6e48e /kernel/panic.c
parent42baa2581c92f8d07e7260506c8d41caf14b0fc3 (diff)
parent1eab0e42450c6038e2bb17da438370fe639973f3 (diff)
Merge branch 'linus' into x86/apic
Pull in update changes so we can apply conflicting patches
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index 04e91ff7560b..4b150bc0c6c1 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -23,6 +23,7 @@
#include <linux/sysrq.h>
#include <linux/init.h>
#include <linux/nmi.h>
+#include <linux/console.h>
#define PANIC_TIMER_STEP 100
#define PANIC_BLINK_SPD 18
@@ -147,6 +148,18 @@ void panic(const char *fmt, ...)
bust_spinlocks(0);
+ /*
+ * We may have ended up stopping the CPU holding the lock (in
+ * smp_send_stop()) while still having some valuable data in the console
+ * buffer. Try to acquire the lock then release it regardless of the
+ * result. The release will also print the buffers out. Locks debug
+ * should be disabled to avoid reporting bad unlock balance when
+ * panic() is not being callled from OOPS.
+ */
+ debug_locks_off();
+ console_trylock();
+ console_unlock();
+
if (!panic_blink)
panic_blink = no_blink;