Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299899
b: refs/heads/master
c: 31e4dda
h: refs/heads/master
i:
  299897: cccf5f8
  299895: e123bd8
v: v3
  • Loading branch information
Bryan Schumaker authored and Trond Myklebust committed Apr 27, 2012
1 parent 683652a commit f5b7072
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea8cfa06795bb30d2ea61f503ef129284492c06a
refs/heads/master: 31e4dda4747713de13889f7c79c7aec341fea61b
24 changes: 19 additions & 5 deletions trunk/fs/nfs/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -5094,16 +5094,13 @@ static int decode_secinfo_gss(struct xdr_stream *xdr, struct nfs4_secinfo_flavor
return -EINVAL;
}

static int decode_secinfo(struct xdr_stream *xdr, struct nfs4_secinfo_res *res)
static int decode_secinfo_common(struct xdr_stream *xdr, struct nfs4_secinfo_res *res)
{
struct nfs4_secinfo_flavor *sec_flavor;
int status;
__be32 *p;
int i, num_flavors;

status = decode_op_hdr(xdr, OP_SECINFO);
if (status)
goto out;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflow;
Expand All @@ -5129,14 +5126,31 @@ static int decode_secinfo(struct xdr_stream *xdr, struct nfs4_secinfo_res *res)
res->flavors->num_flavors++;
}

status = 0;
out:
return status;
out_overflow:
print_overflow_msg(__func__, xdr);
return -EIO;
}

static int decode_secinfo(struct xdr_stream *xdr, struct nfs4_secinfo_res *res)
{
int status = decode_op_hdr(xdr, OP_SECINFO);
if (status)
return status;
return decode_secinfo_common(xdr, res);
}

#if defined(CONFIG_NFS_V4_1)
static int decode_secinfo_no_name(struct xdr_stream *xdr, struct nfs4_secinfo_res *res)
{
int status = decode_op_hdr(xdr, OP_SECINFO_NO_NAME);
if (status)
return status;
return decode_secinfo_common(xdr, res);
}

static int decode_exchange_id(struct xdr_stream *xdr,
struct nfs41_exchange_id_res *res)
{
Expand Down Expand Up @@ -6821,7 +6835,7 @@ static int nfs4_xdr_dec_secinfo_no_name(struct rpc_rqst *rqstp,
status = decode_putrootfh(xdr);
if (status)
goto out;
status = decode_secinfo(xdr, res);
status = decode_secinfo_no_name(xdr, res);
out:
return status;
}
Expand Down

0 comments on commit f5b7072

Please sign in to comment.