nfsd/callback: skip the callback tag
authorKinglong Mee <kinglongmee@gmail.com>
Sun, 5 Feb 2017 01:57:37 +0000 (09:57 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 17 Feb 2017 21:26:01 +0000 (16:26 -0500)
The callback tag is NULL, and hdr->nops is unused too right now, but.
But if we were to ever test with a nonzero callback tag, nops will get a
bad value.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4callback.c

index fb6ca0ace9b18b4c6081a1fc2151c56208e5f21b..ea74149841e7bbcd8f8209e2d70b4e51b29770c4 100644 (file)
@@ -303,6 +303,7 @@ static int decode_cb_compound4res(struct xdr_stream *xdr,
        p = xdr_inline_decode(xdr, length + 4);
        if (unlikely(p == NULL))
                goto out_overflow;
+       p += XDR_QUADLEN(length);
        hdr->nops = be32_to_cpup(p);
        return 0;
 out_overflow: