From f5f87548b9e04a76ebc853f1dc93d7f9951c3eb4 Mon Sep 17 00:00:00 2001 From: Neel Natu Date: Sun, 9 Mar 2014 02:07:15 +0000 Subject: [PATCH] Fix panic "_mtx_lock_sleep: recursed on non-recursive mutex ttymtx" caused when acquiring the tty lock in bvm_tty_close(). Instead just assert that the tty lock is held before calling callout_reset(). --- sys/dev/bvm/bvm_console.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/bvm/bvm_console.c b/sys/dev/bvm/bvm_console.c index 73cdc2a8de9..a7b1bc5ac06 100644 --- a/sys/dev/bvm/bvm_console.c +++ b/sys/dev/bvm/bvm_console.c @@ -128,9 +128,8 @@ static void bvm_tty_close(struct tty *tp) { - tty_lock(tp); + tty_lock_assert(tp, MA_OWNED); callout_stop(&bvm_timer); - tty_unlock(tp); } static void