aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs3xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs3xdr.c')
-rw-r--r--fs/nfsd/nfs3xdr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index 2d116d2298f8..f917fd25858a 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -388,8 +388,11 @@ nfs3svc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
388 * Round the length of the data which was specified up to 388 * Round the length of the data which was specified up to
389 * the next multiple of XDR units and then compare that 389 * the next multiple of XDR units and then compare that
390 * against the length which was actually received. 390 * against the length which was actually received.
391 * Note that when RPCSEC/GSS (for example) is used, the
392 * data buffer can be padded so dlen might be larger
393 * than required. It must never be smaller.
391 */ 394 */
392 if (dlen != XDR_QUADLEN(len)*4) 395 if (dlen < XDR_QUADLEN(len)*4)
393 return 0; 396 return 0;
394 397
395 if (args->count > max_blocksize) { 398 if (args->count > max_blocksize) {