]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/nfsd/nfs3xdr.c
knfsd: Allow NFSv2/3 WRITE calls to succeed when krb5i etc is used.
[net-next-2.6.git] / fs / nfsd / nfs3xdr.c
index 2d116d2298f8e3aec23982bc04795dd9daf69ca2..f917fd25858af81a4edaf712fffa3480ee3a8e6b 100644 (file)
@@ -388,8 +388,11 @@ nfs3svc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
         * Round the length of the data which was specified up to
         * the next multiple of XDR units and then compare that
         * against the length which was actually received.
+        * Note that when RPCSEC/GSS (for example) is used, the
+        * data buffer can be padded so dlen might be larger
+        * than required.  It must never be smaller.
         */
-       if (dlen != XDR_QUADLEN(len)*4)
+       if (dlen < XDR_QUADLEN(len)*4)
                return 0;
 
        if (args->count > max_blocksize) {