diff options
| author | 2015-12-02 09:33:25 -0800 | |
|---|---|---|
| committer | 2015-12-02 09:33:25 -0800 | |
| commit | 0eea505058740aa45486145296ef4fefbd8cab85 (patch) | |
| tree | 1bc265d615b8353405a04630f610a42c48302f47 /kernel/panic.c | |
| parent | Input: parkbd - drop bogus __init from parkbd_allocate_serio() (diff) | |
| parent | Linux 4.4-rc3 (diff) | |
Merge tag 'v4.4-rc3' into next
Merge with Linux 4.4-rc3 to bring in helpers for multiu-driver modules.
Diffstat (limited to 'kernel/panic.c')
| -rw-r--r-- | kernel/panic.c | 13 |
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; |
