summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/pty.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index ddec9f3c339..d505837b347 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -54,7 +54,10 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
wake_up_interruptible(&tty->link->write_wait);
if (tty->driver->subtype == PTY_TYPE_MASTER) {
set_bit(TTY_OTHER_CLOSED, &tty->flags);
- devpts_pty_kill(tty->link);
+#ifdef CONFIG_UNIX98_PTYS
+ if (tty->driver == ptm_driver)
+ devpts_pty_kill(tty->link);
+#endif
tty_unlock();
tty_vhangup(tty->link);
tty_lock();