vkernel - Fix tty panic
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 3 Nov 2018 00:25:35 +0000 (17:25 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 3 Nov 2018 00:25:35 +0000 (17:25 -0700)
* Fix messed up gettoken/reltoken sequence for the vkernel,
  bug was introduced in recent tty work.

Reported-by: tuxillo
sys/platform/vkernel64/platform/console.c

index 183a59c..5c72e5b 100644 (file)
@@ -134,7 +134,7 @@ vcons_close(struct dev_close_args *ap)
        lwkt_gettoken(&tp->t_token);
        (*linesw[tp->t_line].l_close)(tp, ap->a_fflag);
        ttyclose(tp);
-       lwkt_gettoken(&tp->t_token);
+       lwkt_reltoken(&tp->t_token);
        return(0);
 }