Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259053
b: refs/heads/master
c: ae82a8d
h: refs/heads/master
i:
  259051: 7d7e423
v: v3
  • Loading branch information
Mi Jinlong authored and J. Bruce Fields committed Jul 15, 2011
1 parent ba74f35 commit e8433da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b74c25bc1a142ee8dd7ad080e2a974f28d1cb18
refs/heads/master: ae82a8d06fee573def55b63868b1ea109461a531
12 changes: 12 additions & 0 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,14 @@ static bool nfsd4_session_too_many_ops(struct svc_rqst *rqstp, struct nfsd4_sess
return args->opcnt > session->se_fchannel.maxops;
}

static bool nfsd4_request_too_big(struct svc_rqst *rqstp,
struct nfsd4_session *session)
{
struct xdr_buf *xb = &rqstp->rq_arg;

return xb->len > session->se_fchannel.maxreq_sz;
}

__be32
nfsd4_sequence(struct svc_rqst *rqstp,
struct nfsd4_compound_state *cstate,
Expand Down Expand Up @@ -1794,6 +1802,10 @@ nfsd4_sequence(struct svc_rqst *rqstp,
if (nfsd4_session_too_many_ops(rqstp, session))
goto out;

status = nfserr_req_too_big;
if (nfsd4_request_too_big(rqstp, session))
goto out;

status = nfserr_badslot;
if (seq->slotid >= session->se_fchannel.maxreqs)
goto out;
Expand Down

0 comments on commit e8433da

Please sign in to comment.