linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] nfsd/callback: Make sure skip the callback tag
@ 2017-02-05  1:57 Kinglong Mee
  0 siblings, 0 replies; only message in thread
From: Kinglong Mee @ 2017-02-05  1:57 UTC (permalink / raw)
  To: J. Bruce Fields, linux-nfs; +Cc: Kinglong Mee

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 --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:
-- 
2.9.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-05  1:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-05  1:57 [PATCH 2/3] nfsd/callback: Make sure skip the callback tag Kinglong Mee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).