* [PATCH] Fix POSIX ACL permission check
@ 2011-08-06 16:43 Ari Savolainen
2011-08-06 20:01 ` Al Viro
0 siblings, 1 reply; 2+ messages in thread
From: Ari Savolainen @ 2011-08-06 16:43 UTC (permalink / raw)
To: Alexander Viro; +Cc: linux-fsdevel, linux-kernel
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>
---
fs/namei.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index 3d607bd..f5a1351 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);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix POSIX ACL permission check
2011-08-06 16:43 [PATCH] Fix POSIX ACL permission check Ari Savolainen
@ 2011-08-06 20:01 ` Al Viro
0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2011-08-06 20:01 UTC (permalink / raw)
To: Ari Savolainen; +Cc: linux-fsdevel, linux-kernel
On Sat, Aug 06, 2011 at 07:43:07PM +0300, Ari Savolainen wrote:
> 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.
Nice catch. Applied...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-06 20:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-06 16:43 [PATCH] Fix POSIX ACL permission check Ari Savolainen
2011-08-06 20:01 ` Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).