Commit 36ecc148 authored by Matthijs van Duin's avatar Matthijs van Duin Committed by Greg Kroah-Hartman
Browse files

pty: fix O_CLOEXEC for TIOCGPTPEER

It was being ignored because the flags were not passed to fd allocation.

Fixes: 54ebbfb1

 ("tty: add TIOCGPTPEER ioctl")
Signed-off-by: default avatarMatthijs van Duin <matthijsvanduin@gmail.com>
Acked-by: default avatarAleksa Sarai <asarai@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3bae8cea
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment