diff options
| author | Chris Zankel <chris@zankel.net> | 2016-01-21 05:16:13 +0000 |
|---|---|---|
| committer | Chris Zankel <chris@zankel.net> | 2016-01-21 05:16:13 +0000 |
| commit | d1208404dd477c142680437137c9996b95bfd508 (patch) | |
| tree | 0cba53f59f487c0de2b1a0d9fb1b11ae27de96ec /kernel/panic.c | |
| parent | afaa7c542cc9c4d8a99ba252a8ea5e8bc7c897e2 (diff) | |
| parent | afd2ff9b7e1b367172f18ba7f693dfb62bdcb2dc (diff) | |
| download | cachepc-linux-d1208404dd477c142680437137c9996b95bfd508.tar.gz cachepc-linux-d1208404dd477c142680437137c9996b95bfd508.zip | |
Merge tag 'v4.4'
Linux 4.4
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; |
