diff mbox

[2/3] nfsd/callback: Make sure skip the callback tag

Message ID 44bdb3c5-c7c8-f5da-b9d9-da4268d4bf49@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kinglong Mee Feb. 5, 2017, 1:57 a.m. UTC
Although the callback tag is NULL, and hdr->nops is unused too
right now, but, if a testing with callback tag is an non-zero,
the nops will get a bad value.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 fs/nfsd/nfs4callback.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index fb6ca0a..ea74149 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -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: