Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372194
b: refs/heads/master
c: 373cd40
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Apr 9, 2013
1 parent 2450dad commit 18e8ad0
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 0c7c3e67ab91ec6caa44bdf1fc89a48012ceb0c5
refs/heads/master: 373cd4098a6392395af63af220d989df00b444f7
14 changes: 9 additions & 5 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1803,10 +1803,13 @@ nfsd4_replay_create_session(struct nfsd4_create_session *cr_ses,
/* seqid, slotID, slotID, slotID, status */ \
5 ) * sizeof(__be32))

static bool check_forechannel_attrs(struct nfsd4_channel_attrs fchannel)
static __be32 check_forechannel_attrs(struct nfsd4_channel_attrs *ca)
{
return fchannel.maxreq_sz < NFSD_MIN_REQ_HDR_SEQ_SZ
|| fchannel.maxresp_sz < NFSD_MIN_RESP_HDR_SEQ_SZ;
if (ca->maxreq_sz < NFSD_MIN_REQ_HDR_SEQ_SZ)
return nfserr_toosmall;
if (ca->maxresp_sz < NFSD_MIN_RESP_HDR_SEQ_SZ)
return nfserr_toosmall;
return nfs_ok;
}

__be32
Expand All @@ -1824,8 +1827,9 @@ nfsd4_create_session(struct svc_rqst *rqstp,

if (cr_ses->flags & ~SESSION4_FLAG_MASK_A)
return nfserr_inval;
if (check_forechannel_attrs(cr_ses->fore_channel))
return nfserr_toosmall;
status = check_forechannel_attrs(&cr_ses->fore_channel);
if (status)
return status;
new = alloc_session(&cr_ses->fore_channel, nn);
if (!new)
return nfserr_jukebox;
Expand Down

0 comments on commit 18e8ad0

Please sign in to comment.