aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index aa04a6a98bd5..93b50ba1c5e9 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1222,7 +1222,6 @@ nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write)
1222 } 1222 }
1223 write->wr_head.iov_base = p; 1223 write->wr_head.iov_base = p;
1224 write->wr_head.iov_len = avail; 1224 write->wr_head.iov_len = avail;
1225 WARN_ON(avail != (XDR_QUADLEN(avail) << 2));
1226 write->wr_pagelist = argp->pagelist; 1225 write->wr_pagelist = argp->pagelist;
1227 1226
1228 len = XDR_QUADLEN(write->wr_buflen) << 2; 1227 len = XDR_QUADLEN(write->wr_buflen) << 2;
@@ -3696,6 +3695,12 @@ int nfsd4_release_compoundargs(void *rq, __be32 *p, void *resp)
3696int 3695int
3697nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundargs *args) 3696nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundargs *args)
3698{ 3697{
3698 if (rqstp->rq_arg.head[0].iov_len % 4) {
3699 /* client is nuts */
3700 dprintk("%s: compound not properly padded! (peeraddr=%pISc xid=0x%x)",
3701 __func__, svc_addr(rqstp), be32_to_cpu(rqstp->rq_xid));
3702 return 0;
3703 }
3699 args->p = p; 3704 args->p = p;
3700 args->end = rqstp->rq_arg.head[0].iov_base + rqstp->rq_arg.head[0].iov_len; 3705 args->end = rqstp->rq_arg.head[0].iov_base + rqstp->rq_arg.head[0].iov_len;
3701 args->pagelist = rqstp->rq_arg.pages; 3706 args->pagelist = rqstp->rq_arg.pages;