summaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-26 17:01:04 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-27 03:10:01 +0200
commitc6f3d81115989e274c42a852222b80d2e14ced6f (patch)
tree8a0e17df64381ab883acd76f5190b33fc80126ea /fs/open.c
parentprocfs: Convert /proc/pid/fdinfo/ handling routines to seq-file v2 (diff)
downloadlinux-c6f3d81115989e274c42a852222b80d2e14ced6f.tar.xz
linux-c6f3d81115989e274c42a852222b80d2e14ced6f.zip
don't leak O_CLOEXEC into ->f_flags
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/open.c b/fs/open.c
index 30760017deed..03028d0e7487 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -814,7 +814,7 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o
op->mode = 0;
/* Must never be set by userspace */
- flags &= ~FMODE_NONOTIFY;
+ flags &= ~FMODE_NONOTIFY & ~O_CLOEXEC;
/*
* O_SYNC is implemented as __O_SYNC|O_DSYNC. As many places only