diff options
author | mbr <mbr@FreeBSD.org> | 2006-12-19 16:46:13 +0000 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2006-12-19 16:46:13 +0000 |
commit | ccabbc6486b34f6715abe1c18290cd626ce8d4ae (patch) | |
tree | ad8872477d3733129dcac213a69eab150aafe7d8 /sys/kern | |
parent | b0b74f9bd357ada29161405649cca99e47fb08d7 (diff) | |
download | FreeBSD-src-ccabbc6486b34f6715abe1c18290cd626ce8d4ae.zip FreeBSD-src-ccabbc6486b34f6715abe1c18290cd626ce8d4ae.tar.gz |
Add the tp->t_refcnt validity check back. There are still some race
conditions where tp->t_refcnt can go to zero.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 5e7c596..cdb7906 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -340,7 +340,7 @@ tty_close(struct tty *tp) * this method. Only the thread clearing TS_ISOPEN should * release the reference to the tty. */ - if (ISSET(ostate, TS_ISOPEN)) + if (ISSET(ostate, TS_ISOPEN) && tp->t_refcnt > 1) ttyrel(tp); splx(s); return (0); |