summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_pty.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/tty_pty.c')
-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 2f1b2eb..a973f6a 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;
OpenPOWER on IntegriCloud