diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-06-20 22:59:02 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 05:43:18 (GMT) |
commit | 1fc0f78ca9f311c6277e2f1b7655bb4d43ceb311 (patch) | |
tree | 9c6a5879558b7a189f94eae97ac80268e63fe29b /fs/namei.c | |
parent | 178ea73521d64ba41d7aa5488fb9f549c6d4507d (diff) | |
download | linux-fsl-qoriq-1fc0f78ca9f311c6277e2f1b7655bb4d43ceb311.tar.xz |
->permission() sanitizing: MAY_NOT_BLOCK
Duplicate the flags argument into mask bitmap.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -318,13 +318,16 @@ static inline int exec_permission(struct inode *inode, unsigned int flags) { int ret; struct user_namespace *ns = inode_userns(inode); + int mask = MAY_EXEC; + if (flags & IPERM_FLAG_RCU) + mask |= MAY_NOT_BLOCK; if (inode->i_op->permission) { - ret = inode->i_op->permission(inode, MAY_EXEC, flags); + ret = inode->i_op->permission(inode, mask, flags); if (likely(!ret)) goto ok; } else { - ret = acl_permission_check(inode, MAY_EXEC, flags); + ret = acl_permission_check(inode, mask, flags); if (likely(!ret)) goto ok; if (ret != -EACCES) |