diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2012-10-09 00:21:58 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 08:52:31 +0200 |
commit | 121977187ca0a7f20b848530deb04cc56167769b (patch) | |
tree | be4fc44f5aff4fe226e371959f3734db5bf4427e /fs/fcntl.c | |
parent | Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/... (diff) | |
download | linux-121977187ca0a7f20b848530deb04cc56167769b.tar.xz linux-121977187ca0a7f20b848530deb04cc56167769b.zip |
Fix F_DUPFD_CLOEXEC breakage
Fix a braino in F_DUPFD_CLOEXEC; f_dupfd() expects flags for alloc_fd(),
get_unused_fd() etc and there clone-on-exec if O_CLOEXEC, not
FD_CLOEXEC.
Reported-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r-- | fs/fcntl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c index 8f704291d4ed..71a600a19f06 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -258,7 +258,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, err = f_dupfd(arg, filp, 0); break; case F_DUPFD_CLOEXEC: - err = f_dupfd(arg, filp, FD_CLOEXEC); + err = f_dupfd(arg, filp, O_CLOEXEC); break; case F_GETFD: err = get_close_on_exec(fd) ? FD_CLOEXEC : 0; |