linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfsd41: compare request's opcnt with session's maxops at nfsd4_sequence
@ 2011-04-27  1:09 Mi Jinlong
  2011-04-27  2:41 ` J. Bruce Fields
  0 siblings, 1 reply; 5+ messages in thread
From: Mi Jinlong @ 2011-04-27  1:09 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: NFS

Make sure nfs server can distinguish request contains more ops
than channel allowed.

Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
---
 fs/nfsd/nfs4state.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index fbde6f7..4f9fc68 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1749,6 +1749,11 @@ nfsd4_sequence(struct svc_rqst *rqstp,
 	if (!session)
 		goto out;
 
+	status = nfserr_too_many_ops;
+	if (((struct nfsd4_compoundargs *)rqstp->rq_argp)->opcnt >
+				 session->se_fchannel.maxops)
+		goto out;
+
 	status = nfserr_badslot;
 	if (seq->slotid >= session->se_fchannel.maxreqs)
 		goto out;
-- 
1.7.4.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-09  9:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27  1:09 [PATCH] nfsd41: compare request's opcnt with session's maxops at nfsd4_sequence Mi Jinlong
2011-04-27  2:41 ` J. Bruce Fields
2011-04-27  5:48   ` Mi Jinlong
2011-05-03  3:48     ` J. Bruce Fields
2011-05-09  9:26       ` Mi Jinlong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).