mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 12:24:34 +08:00
Fix POSIX ACL permission check
After commit 3567866bf2
: "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 <ari.m.savolainen@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
c2f340a69c
commit
206b1d09a5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user