aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-11-01 12:42:25 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-11-01 12:42:25 -0400
commitfcb63a9bd8427fc584229048ea14f1453dc9a2e1 (patch)
tree45530658d49990c01211339d7bb93f363c8002ed /fs/nfs
parent12207f69b3ef4d6eea6a5568281e49f671977ab1 (diff)
NFS: Fix a missing initialisation when reading the SELinux label
Ensure that _nfs4_do_get_security_label() also initialises the SEQUENCE call correctly, by having it call into nfs4_call_sync(). Reported-by: Jeff Layton <jlayton@redhat.com> Cc: stable@vger.kernel.org # 3.11+ Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index d436c576e988..7e28b5c77cbc 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4602,7 +4602,7 @@ static int _nfs4_get_security_label(struct inode *inode, void *buf,
4602 struct nfs4_label label = {0, 0, buflen, buf}; 4602 struct nfs4_label label = {0, 0, buflen, buf};
4603 4603
4604 u32 bitmask[3] = { 0, 0, FATTR4_WORD2_SECURITY_LABEL }; 4604 u32 bitmask[3] = { 0, 0, FATTR4_WORD2_SECURITY_LABEL };
4605 struct nfs4_getattr_arg args = { 4605 struct nfs4_getattr_arg arg = {
4606 .fh = NFS_FH(inode), 4606 .fh = NFS_FH(inode),
4607 .bitmask = bitmask, 4607 .bitmask = bitmask,
4608 }; 4608 };
@@ -4613,14 +4613,14 @@ static int _nfs4_get_security_label(struct inode *inode, void *buf,
4613 }; 4613 };
4614 struct rpc_message msg = { 4614 struct rpc_message msg = {
4615 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_GETATTR], 4615 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_GETATTR],
4616 .rpc_argp = &args, 4616 .rpc_argp = &arg,
4617 .rpc_resp = &res, 4617 .rpc_resp = &res,
4618 }; 4618 };
4619 int ret; 4619 int ret;
4620 4620
4621 nfs_fattr_init(&fattr); 4621 nfs_fattr_init(&fattr);
4622 4622
4623 ret = rpc_call_sync(server->client, &msg, 0); 4623 ret = nfs4_call_sync(server->client, server, &msg, &arg.seq_args, &res.seq_res, 0);
4624 if (ret) 4624 if (ret)
4625 return ret; 4625 return ret;
4626 if (!(fattr.valid & NFS_ATTR_FATTR_V4_SECURITY_LABEL)) 4626 if (!(fattr.valid & NFS_ATTR_FATTR_V4_SECURITY_LABEL))