Skip to content

Commit

Permalink
Fix POSIX ACL permission check
Browse files Browse the repository at this point in the history
After commit 3567866: "RCUify freeing acls, let check_acl() go ahead in
RCU mode if acl is cached" posix_acl_permission is being called with an
unsupported flag and the permission check fails. This patch fixes the issue.

Signed-off-by: Ari Savolainen <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Ari Savolainen authored and Al Viro committed Aug 7, 2011
1 parent c2f340a commit 206b1d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static int check_acl(struct inode *inode, int mask)
/* no ->get_acl() calls in RCU mode... */
if (acl == ACL_NOT_CACHED)
return -ECHILD;
return posix_acl_permission(inode, acl, mask);
return posix_acl_permission(inode, acl, mask & ~MAY_NOT_BLOCK);
}

acl = get_cached_acl(inode, ACL_TYPE_ACCESS);
Expand Down

0 comments on commit 206b1d0

Please sign in to comment.