From: Jeff Layton <jlayton@redhat.com> Date: Wed, 20 Aug 2008 07:45:04 -0400 Subject: [nfs] missing nfs_fattr_init in nfsv3 acl functions Message-id: 1219232704-21410-1-git-send-email-jlayton@redhat.com O-Subject: [RHEL5.3 PATCH] BZ#453711: NFS: missing nfs_fattr_init in nfs3_proc_getacl and nfs3_proc_setacls Bugzilla: 453711 RH-Acked-by: Peter Staubach <staubach@redhat.com> RH-Acked-by: Steve Dickson <SteveD@redhat.com> The fattrs used in the NFSv3 getacl/setacl calls are not being properly initialized. This can cause the nfs revalidation mechanisms to become very confused and do things like fall into NFSv4 codepaths, and spuriously invalidate inodes when they shouldn't. Upstream status: This patch is not yet upstream. I've sent it to Trond on three separate occasions over the last month and have not received any response. The patch seems obvious to me and I hope that he'll pick it up before the next upstream merge window. I'd like to go ahead and get this into 5.3. If it turns out to need some sort of modification upstream, we can back it out in 5.4 and go with the upstream version. I don't expect that that will be the case though. Signed-off-by: Jeff Layton <jlayton@redhat.com> diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c index 9b73625..efb2724 100644 --- a/fs/nfs/nfs3acl.c +++ b/fs/nfs/nfs3acl.c @@ -225,6 +225,7 @@ struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type) dprintk("NFS call getacl\n"); msg.rpc_proc = &server->client_acl->cl_procinfo[ACLPROC3_GETACL]; + nfs_fattr_init(&fattr); status = rpc_call_sync(server->client_acl, &msg, 0); dprintk("NFS reply getacl: %d\n", status); @@ -318,6 +319,7 @@ static int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, dprintk("NFS call setacl\n"); msg.rpc_proc = &server->client_acl->cl_procinfo[ACLPROC3_SETACL]; + nfs_fattr_init(&fattr); status = rpc_call_sync(server->client_acl, &msg, 0); spin_lock(&inode->i_lock); NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ACCESS;