linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NFSD: fix decode_cb_sequence4resok
@ 2011-02-22 22:43 Benny Halevy
  2011-02-23  0:11 ` J. Bruce Fields
  2011-02-23 16:48 ` Chuck Lever
  0 siblings, 2 replies; 10+ messages in thread
From: Benny Halevy @ 2011-02-22 22:43 UTC (permalink / raw)
  To:  J. Bruce Fields; +Cc: linux-nfs, Benny Halevy, Chuck Lever

Fix bug introduced in patch
85a56480 NFSD: Update XDR decoders in NFSv4 callback client

Although decode_cb_sequence4resok ignores highest slotid and target highest slotid
it must account for their space in their xdr stream when calling xdr_inline_decode

Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfsd/nfs4callback.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index da54498..d046bdb 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -592,7 +592,7 @@ static int decode_cb_sequence4resok(struct xdr_stream *xdr,
 	 * If the server returns different values for sessionID, slotID or
 	 * sequence number, the server is looney tunes.
 	 */
-	p = xdr_inline_decode(xdr, NFS4_MAX_SESSIONID_LEN + 4 + 4);
+	p = xdr_inline_decode(xdr, NFS4_MAX_SESSIONID_LEN + 4 + 4 + 4 + 4);
 	if (unlikely(p == NULL))
 		goto out_overflow;
 	memcpy(id.data, p, NFS4_MAX_SESSIONID_LEN);
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-02-25  0:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-22 22:43 [PATCH] NFSD: fix decode_cb_sequence4resok Benny Halevy
2011-02-23  0:11 ` J. Bruce Fields
2011-02-23  0:15   ` Benny Halevy
2011-02-23  0:24     ` J. Bruce Fields
2011-02-23 16:48 ` Chuck Lever
2011-02-23 17:08   ` Benny Halevy
2011-02-23 17:29     ` J. Bruce Fields
2011-02-23 18:07       ` Benny Halevy
2011-02-23 18:43         ` Benny Halevy
2011-02-25  0:36           ` J. Bruce Fields

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).