pty: fix O_CLOEXEC for TIOCGPTPEER
authorMatthijs van Duin <matthijsvanduin@gmail.com>
Thu, 19 Jul 2018 08:43:46 +0000 (10:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:07:14 +0000 (13:07 +0200)
commit965f2fed020e56bfdf09e08a86e2d63902213f7b
tree494504b82ae0c8bafc81e5dd5778bc781056690b
parent5be1b251b3b82833d042ef5e6c906303cf638a87
pty: fix O_CLOEXEC for TIOCGPTPEER

commit 36ecc1481dc8d8c52d43ba18c6b642c1d2fde789 upstream.

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 <matthijsvanduin@gmail.com>
Acked-by: Aleksa Sarai <asarai@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/pty.c