diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-03 16:23:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-03 16:23:03 -0500 |
commit | 56a79b7b021bf1b08334e63c2c14b280e2dbf47a (patch) | |
tree | 0419233e6194f4f12073c9284852885aa8984bec /security | |
parent | 1c82315a12144cde732636e259d39e3ee81b3c5b (diff) | |
parent | dcf787f39162ce32ca325b3e784aba2d2444619a (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more VFS bits from Al Viro:
"Unfortunately, it looks like xattr series will have to wait until the
next cycle ;-/
This pile contains 9p cleanups and fixes (races in v9fs_fid_add()
etc), fixup for nommu breakage in shmem.c, several cleanups and a bit
more file_inode() work"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
constify path_get/path_put and fs_struct.c stuff
fix nommu breakage in shmem.c
cache the value of file_inode() in struct file
9p: if v9fs_fid_lookup() gets to asking server, it'd better have hashed dentry
9p: make sure ->lookup() adds fid to the right dentry
9p: untangle ->lookup() a bit
9p: double iput() in ->lookup() if d_materialise_unique() fails
9p: v9fs_fid_add() can't fail now
v9fs: get rid of v9fs_dentry
9p: turn fid->dlist into hlist
9p: don't bother with private lock in ->d_fsdata; dentry->d_lock will do just fine
more file_inode() open-coded instances
selinux: opened file can't have NULL or negative ->f_path.dentry
(In the meantime, the hlist traversal macros have changed, so this
required a semantic conflict fixup for the newly hlistified fid->dlist)
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/hooks.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 84b591711eec..2fa28c88900c 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -3135,11 +3135,6 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd, | |||
3135 | 3135 | ||
3136 | switch (cmd) { | 3136 | switch (cmd) { |
3137 | case F_SETFL: | 3137 | case F_SETFL: |
3138 | if (!file->f_path.dentry || !file->f_path.dentry->d_inode) { | ||
3139 | err = -EINVAL; | ||
3140 | break; | ||
3141 | } | ||
3142 | |||
3143 | if ((file->f_flags & O_APPEND) && !(arg & O_APPEND)) { | 3138 | if ((file->f_flags & O_APPEND) && !(arg & O_APPEND)) { |
3144 | err = file_has_perm(cred, file, FILE__WRITE); | 3139 | err = file_has_perm(cred, file, FILE__WRITE); |
3145 | break; | 3140 | break; |
@@ -3162,10 +3157,6 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd, | |||
3162 | case F_SETLK64: | 3157 | case F_SETLK64: |
3163 | case F_SETLKW64: | 3158 | case F_SETLKW64: |
3164 | #endif | 3159 | #endif |
3165 | if (!file->f_path.dentry || !file->f_path.dentry->d_inode) { | ||
3166 | err = -EINVAL; | ||
3167 | break; | ||
3168 | } | ||
3169 | err = file_has_perm(cred, file, FILE__LOCK); | 3160 | err = file_has_perm(cred, file, FILE__LOCK); |
3170 | break; | 3161 | break; |
3171 | } | 3162 | } |