From: Ari Savolainen Date: Sat, 6 Aug 2011 16:43:07 +0000 (+0300) Subject: Fix POSIX ACL permission check X-Git-Tag: firefly_0821_release~3680^2~4699 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=206b1d09a56dcd2db1052245c4131879c410eaf8;p=firefly-linux-kernel-4.4.55.git Fix POSIX ACL permission check After commit 3567866bf261: "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 Signed-off-by: Al Viro --- diff --git a/fs/namei.c b/fs/namei.c index 4a98bf154d88..fc13609a354a 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -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);