PERFORCE change 148494 for review
Ed Schouten
ed at FreeBSD.org
Tue Aug 26 06:18:41 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=148494
Change 148494 by ed at ed_dull on 2008/08/26 06:18:38
We must check for zero-length queues when actually destroying
the TTY, not when a close() is being processed.
Affected files ...
.. //depot/projects/mpsafetty/sys/kern/tty.c#32 edit
Differences ...
==== //depot/projects/mpsafetty/sys/kern/tty.c#32 (text+ko) ====
@@ -895,6 +895,10 @@
tty_list_count--;
sx_xunlock(&tty_list_sx);
+ /* Make sure we haven't leaked buffers. */
+ MPASS(ttyinq_getsize(&tp->t_inq) == 0);
+ MPASS(ttyoutq_getsize(&tp->t_outq) == 0);
+
knlist_destroy(&tp->t_inpoll.si_note);
knlist_destroy(&tp->t_outpoll.si_note);
@@ -923,9 +927,6 @@
return;
}
- MPASS(ttyinq_getsize(&tp->t_inq) == 0);
- MPASS(ttyoutq_getsize(&tp->t_outq) == 0);
-
/* TTY can be deallocated. */
dev = tp->t_dev;
tp->t_dev = NULL;
More information about the p4-projects
mailing list