]> Git Repo - linux.git/commit
panic: release stale console lock to always get the logbuf printed out
authorVitaly Kuznetsov <[email protected]>
Sat, 7 Nov 2015 00:32:58 +0000 (16:32 -0800)
committerLinus Torvalds <[email protected]>
Sat, 7 Nov 2015 01:50:42 +0000 (17:50 -0800)
commit08d78658f393fefaa2e6507ea052c6f8ef4002a2
treed013128ecf2efb6f4d2701f92745cab54f7511ab
parent7f8306429c4c75f9e2bf39fcfe990b0af2f7292d
panic: release stale console lock to always get the logbuf printed out

In some cases we may end up killing the CPU holding the console lock
while still having valuable data in logbuf. E.g. I'm observing the
following:

- A crash is happening on one CPU and console_unlock() is being called on
  some other.

- console_unlock() tries to print out the buffer before releasing the lock
  and on slow console it takes time.

- in the meanwhile crashing CPU does lots of printk()-s with valuable data
  (which go to the logbuf) and sends IPIs to all other CPUs.

- console_unlock() finishes printing previous chunk and enables interrupts
  before trying to print out the rest, the CPU catches the IPI and never
  releases console lock.

This is not the only possible case: in VT/fb subsystems we have many other
console_lock()/console_unlock() users.  Non-masked interrupts (or
receiving NMI in case of extreme slowness) will have the same result.
Getting the whole console buffer printed out on crash should be top
priority.

[[email protected]: tweak comment text]
Signed-off-by: Vitaly Kuznetsov <[email protected]>
Cc: HATAYAMA Daisuke <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Prarit Bhargava <[email protected]>
Cc: Xie XiuQi <[email protected]>
Cc: Seth Jennings <[email protected]>
Cc: "K. Y. Srinivasan" <[email protected]>
Cc: Jan Kara <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/panic.c
This page took 0.053416 seconds and 4 git commands to generate.