diff options
Diffstat (limited to 'kernel/panic.c')
-rw-r--r-- | kernel/panic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index 04e91ff7560b..4579dbb7ed87 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/sysrq.h> | 23 | #include <linux/sysrq.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/nmi.h> | 25 | #include <linux/nmi.h> |
26 | #include <linux/console.h> | ||
26 | 27 | ||
27 | #define PANIC_TIMER_STEP 100 | 28 | #define PANIC_TIMER_STEP 100 |
28 | #define PANIC_BLINK_SPD 18 | 29 | #define PANIC_BLINK_SPD 18 |
@@ -147,6 +148,15 @@ void panic(const char *fmt, ...) | |||
147 | 148 | ||
148 | bust_spinlocks(0); | 149 | bust_spinlocks(0); |
149 | 150 | ||
151 | /* | ||
152 | * We may have ended up stopping the CPU holding the lock (in | ||
153 | * smp_send_stop()) while still having some valuable data in the console | ||
154 | * buffer. Try to acquire the lock then release it regardless of the | ||
155 | * result. The release will also print the buffers out. | ||
156 | */ | ||
157 | console_trylock(); | ||
158 | console_unlock(); | ||
159 | |||
150 | if (!panic_blink) | 160 | if (!panic_blink) |
151 | panic_blink = no_blink; | 161 | panic_blink = no_blink; |
152 | 162 | ||