summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2006-10-04 05:43:39 +0000
committerMartin Blapp <mbr@FreeBSD.org>2006-10-04 05:43:39 +0000
commit89ff1e4cb88bd0bafbd8fd3706a413fce87afc04 (patch)
tree506cf575992c7e6519d015922755629355dd025b /sys/kern
parent011a0a043298575955f098993673412739d98fc6 (diff)
Notes
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/tty_pty.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 2f1b2eb17082..a973f6a51119 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -335,15 +335,8 @@ ptcopen(struct cdev *dev, int flag, int devtype, struct thread *td)
}
tp = dev->si_tty;
- if (tp->t_oproc) {
- /*
- * Only return if we have a non empty
- * state to avoid leakage. Workaround for
- * vfs bugs and complications near revoke().
- */
- if (tp->t_state != 0x0 || tp->t_refcnt > 1)
- return (EIO);
- }
+ if (tp->t_oproc)
+ return (EIO);
tp->t_timeout = -1;
tp->t_oproc = ptsstart;
tp->t_stop = ptsstop;