diff options
author | Matthijs van Duin <[email protected]> | 2018-07-19 10:43:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2018-07-21 09:08:47 +0200 |
commit | 36ecc1481dc8d8c52d43ba18c6b642c1d2fde789 (patch) | |
tree | 0c8994062a1ee54fbcbaaadb7bb8f1128ff434c1 | |
parent | 3bae8cea04c6db58e5e694e708bd33dac924bf30 (diff) |
pty: fix O_CLOEXEC for TIOCGPTPEER
It was being ignored because the flags were not passed to fd allocation.
Fixes: 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl")
Signed-off-by: Matthijs van Duin <[email protected]>
Acked-by: Aleksa Sarai <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-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 b0e2c4847a5d..678406e0948b 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -625,7 +625,7 @@ int ptm_open_peer(struct file *master, struct tty_struct *tty, int flags) if (tty->driver != ptm_driver) return -EIO; - fd = get_unused_fd_flags(0); + fd = get_unused_fd_flags(flags); if (fd < 0) { retval = fd; goto err; |