diff options
| author | James Morris <james.l.morris@oracle.com> | 2015-11-23 22:46:28 +1100 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2015-11-23 22:46:28 +1100 |
| commit | ebd68df3f24b318d391d15c458d6f43f340ba36a (patch) | |
| tree | f0277bc4b853abe5db1d30fa4e10b05bba7f2ac5 /kernel/panic.c | |
| parent | e42852bf88144affc227884b62637118ba74b783 (diff) | |
| parent | 1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff) | |
Sync to Linus v4.4-rc2 for LSM developers.
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; |
