diff options
| author | Ari Savolainen <ari.m.savolainen@gmail.com> | 2011-08-06 12:43:07 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-08-07 04:52:23 -0400 |
| commit | 206b1d09a56dcd2db1052245c4131879c410eaf8 (patch) | |
| tree | 86a5d67b10c8736b47323cde7717068e98a023e1 | |
| parent | c2f340a69cabe0fb7b9f02d1a2495927db225a06 (diff) | |
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 <ari.m.savolainen@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| -rw-r--r-- | fs/namei.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
| 186 | /* no ->get_acl() calls in RCU mode... */ | 186 | /* no ->get_acl() calls in RCU mode... */ |
| 187 | if (acl == ACL_NOT_CACHED) | 187 | if (acl == ACL_NOT_CACHED) |
| 188 | return -ECHILD; | 188 | return -ECHILD; |
| 189 | return posix_acl_permission(inode, acl, mask); | 189 | return posix_acl_permission(inode, acl, mask & ~MAY_NOT_BLOCK); |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | acl = get_cached_acl(inode, ACL_TYPE_ACCESS); | 192 | acl = get_cached_acl(inode, ACL_TYPE_ACCESS); |
