X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Fpanic.c;h=41e2b54f36b5cdc73ecbda53a246662ba541ba57;hb=cd13e478935eac5512185a7532afb725e45373b1;hp=4579dbb7ed872a7e1c119fdbbf98d9dc8cd67a87;hpb=be9e2f775f5a3147205c552534c3abf0f9374a13;p=firefly-linux-kernel-4.4.55.git diff --git a/kernel/panic.c b/kernel/panic.c index 4579dbb7ed87..41e2b54f36b5 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -152,10 +152,12 @@ void panic(const char *fmt, ...) * 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. + * 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. */ - console_trylock(); - console_unlock(); + debug_locks_off(); + console_flush_on_panic(); if (!panic_blink) panic_blink = no_blink;