diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2013-01-30 12:43:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-04 15:40:29 -0800 |
commit | 80cace72566633bb99da1f022f71d3dac3498b02 (patch) | |
tree | 3f23619bc0f1bf0625fce0c9d4bbc89b484077e3 /drivers/tty/pty.c | |
parent | 7be88b4ccb62737abe4bf27f9e66e224a70a12c4 (diff) | |
download | op-kernel-dev-80cace72566633bb99da1f022f71d3dac3498b02.zip op-kernel-dev-80cace72566633bb99da1f022f71d3dac3498b02.tar.gz |
pty: Ignore slave open count for master pty open
Multiple slave pty opens may be performed in parallel with the
master open. Of course, all the slave opens will fail because the
master pty is still locked but during this time the slave pty
count will be artificially greater than 1. This is should not
cause the master pty open to fail.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/pty.c')
-rw-r--r-- | drivers/tty/pty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index d38455f..c24b4db 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -256,7 +256,7 @@ static int pty_open(struct tty_struct *tty, struct file *filp) goto out; if (test_bit(TTY_PTY_LOCK, &tty->link->flags)) goto out; - if (tty->link->count != 1) + if (tty->driver->subtype == PTY_TYPE_SLAVE && tty->link->count != 1) goto out; clear_bit(TTY_IO_ERROR, &tty->flags); |