From: Miklos Szeredi <mszeredi@suse.cz> Handle auxiliary mask bits in nfs_permission() properly. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> --- fs/nfs/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: linux-2.6/fs/nfs/dir.c =================================================================== --- linux-2.6.orig/fs/nfs/dir.c 2008-07-21 09:46:07.000000000 +0200 +++ linux-2.6/fs/nfs/dir.c 2008-07-21 13:09:28.000000000 +0200 @@ -1884,7 +1884,7 @@ static int nfs_do_access(struct inode *i return status; nfs_access_add_cache(inode, &cache); out: - if ((cache.mask & mask) == mask) + if ((mask & ~cache.mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) == 0) return 0; return -EACCES; } @@ -1914,7 +1914,7 @@ int nfs_permission(struct inode *inode, nfs_inc_stats(inode, NFSIOS_VFSACCESS); - if (mask == 0) + if ((mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) == 0) goto out; /* Is this sys_access() ? */ if (mask & MAY_ACCESS) --
| Jens Axboe | Re: [BUG] New Kernel Bugs |
| KAMEZAWA Hiroyuki | Re: 2.6.24-rc3-mm1 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Jarek Poplawski | Re: [BUG #12364] Re: HTB - very bad precision? HFSC works fine! 2.6.28 |
| Alexey Dobriyan | Re: [GIT]: Networking |
