mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
pty: fix O_CLOEXEC for TIOCGPTPEER
It was being ignored because the flags were not passed to fd allocation.
Fixes: 54ebbfb160 ("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]>
This commit is contained in:
parent
3bae8cea04
commit
36ecc1481d
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue