git: kernel - Fix syscons deadlock during panic
dillon at crater.dragonflybsd.org
Fri Jun 26 14:52:33 PDT 2015
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Fri Jun 26 14:05:40 2015 -0700
kernel - Fix syscons deadlock during panic
* The system console can deadlock during a panic if a cpu is stopped
while holding syscons_mtx.
* The new asynchronous update thread makes this problem more likely to occur.
* Fix the problem by recoding syscons_lock() to detect the panic or shutdown
condition and loop for up to 0.5 seconds trying to get the syscons_mtx.
If it is unable to acquire it, it reinitializes the mutex.
* We still have issues with VT switching away from X.
Summary of changes:
sys/dev/misc/syscons/sckmsrndr.c | 4 +-
sys/dev/misc/syscons/scterm-dumb.c | 4 +-
sys/dev/misc/syscons/scterm-sc.c | 4 +-
sys/dev/misc/syscons/scterm.c | 6 ++-
sys/dev/misc/syscons/sctermvar.h | 32 +++++++++++----
sys/dev/misc/syscons/scvgarndr.c | 2 -
sys/dev/misc/syscons/syscons.c | 82 +++++++++++++++++++++++++++-----------
7 files changed, 95 insertions(+), 39 deletions(-)
DragonFly BSD source repository
More information about the Commits