kernel - Do not back out critical section for exchange_scr() call
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 1 Nov 2010 02:38:46 +0000 (19:38 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 1 Nov 2010 06:13:06 +0000 (23:13 -0700)
* The critical section may be protecting a spinlock and cannot be safely
  backed out when calling exchange_scr().

* Fixes a panic.

Reported-by: rob
sys/dev/misc/syscons/syscons.c

index 20a779f..982cead 100644 (file)
@@ -2540,9 +2540,7 @@ do_switch_scr(sc_softc_t *sc)
     lwkt_gettoken(&tty_token);
     vt_proc_alive(sc->new_scp);
 
-    crit_exit();
     exchange_scr(sc);
-    crit_enter();
     /* sc->cur_scp == sc->new_scp */
     wakeup((caddr_t)&sc->cur_scp->smode);