Date: Sat, 27 Sep 2008 10:23:29 GMT From: Ed Schouten <ed@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 150555 for review Message-ID: <200809271023.m8RANT2Q097166@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=150555 Change 150555 by ed@ed_dull on 2008/09/27 10:22:38 Add a little more sanity checking to tty_(timed)wait(). In our current TTY layer design it isn't possible to sleep on a TTY that has been abandoned by the driver. Add an assertion to tty_(timed)wait() to disallow sleeping when the TTY is gone. Affected files ... .. //depot/projects/mpsafetty/sys/kern/tty.c#51 edit Differences ... ==== //depot/projects/mpsafetty/sys/kern/tty.c#51 (text+ko) ==== @@ -1189,6 +1189,7 @@ tty_lock_assert(tp, MA_OWNED|MA_NOTRECURSED); #endif tty_lock_assert(tp, MA_OWNED); + MPASS(!tty_gone(tp)); error = cv_wait_sig(cv, tp->t_mtx); @@ -1214,6 +1215,7 @@ tty_lock_assert(tp, MA_OWNED|MA_NOTRECURSED); #endif tty_lock_assert(tp, MA_OWNED); + MPASS(!tty_gone(tp)); error = cv_timedwait_sig(cv, tp->t_mtx, hz);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809271023.m8RANT2Q097166>