aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons/syscons.c
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2018-06-02 08:38:59 +0000
committerBruce Evans <bde@FreeBSD.org>2018-06-02 08:38:59 +0000
commitb9cedb46e27463290f32193cb07d2ee4c2536520 (patch)
treefa30d31501856516f762fd29274fe1926b426f4f /sys/dev/syscons/syscons.c
parent2c1fdbac13272f4a0cab577fab5e5d44a7c96a50 (diff)
downloadsrc-b9cedb46e27463290f32193cb07d2ee4c2536520.tar.gz
src-b9cedb46e27463290f32193cb07d2ee4c2536520.zip
Notes
Diffstat (limited to 'sys/dev/syscons/syscons.c')
-rw-r--r--sys/dev/syscons/syscons.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index c8c53e71fd9f..4b5d46b9be62 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -1807,13 +1807,19 @@ sccnscrlock(sc_softc_t *sc, struct sc_cnstate *sp)
* enough to ignore the protection even in the kdb_active case.
*/
if (kdb_active) {
- sp->kdb_locked = sc->video_mtx.mtx_lock == MTX_UNOWNED || panicstr;
+ sp->kdb_locked = sc->video_mtx.mtx_lock == MTX_UNOWNED ||
+ SCHEDULER_STOPPED();
sp->mtx_locked = FALSE;
} else {
sp->kdb_locked = FALSE;
for (retries = 0; retries < 1000; retries++) {
sp->mtx_locked = mtx_trylock_spin_flags(&sc->video_mtx,
- MTX_QUIET) != 0 || panicstr;
+ MTX_QUIET) != 0;
+ if (SCHEDULER_STOPPED()) {
+ sp->kdb_locked = TRUE;
+ sp->mtx_locked = FALSE;
+ break;
+ }
if (sp->mtx_locked)
break;
DELAY(1);