X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=kernel%2Fpanic.c;h=4579dbb7ed872a7e1c119fdbbf98d9dc8cd67a87;hb=9433c3ff287adb53c788ee255a987d451fca211a;hp=04e91ff7560b3a35445f006a5be6e1d786bde245;hpb=3d3e66ba2ced6c5ba7d960f106ba2d3a4444c4ab;p=karo-tx-linux.git 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 @@ #include #include #include +#include #define PANIC_TIMER_STEP 100 #define PANIC_BLINK_SPD 18 @@ -147,6 +148,15 @@ 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. + */ + console_trylock(); + console_unlock(); + if (!panic_blink) panic_blink = no_blink;