Skip to contentSkip to conversation

SQUASHME: nfsd4: fix cb_recall encoding

PATCH In review J. Bruce Fields 2 participants 3 messages May 24, 2010 – May 25, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SQUASHME: nfsd4: fix cb_recall encoding

From: J. Bruce Fields <[email protected]>

"nfsd: nfs4callback encode_stateid helper function" forgot to reserve more space after return from the new helper.

---
 fs/nfsd/nfs4callback.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Benny, maybe you could fix that patch and then pass it upstream?

--b.

fs/nfsd/nfs4callback.c +1 -0
index b279738..238e0b8 100644
@@ -246,6 +246,7 @@ encode_cb_recall(struct xdr_stream *xdr, struct nfs4_delegation *dp,
 	RESERVE_SPACE(4);
 	WRITE32(OP_CB_RECALL);
 	encode_stateid(xdr, &dp->dl_stateid);
+	RESERVE_SPACE(8 + (XDR_QUADLEN(len) << 2));
 	WRITE32(0); /* truncate optimization not implemented */
 	WRITE32(len);
 	WRITEMEM(&dp->dl_fh.fh_base, len);
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 5 lines · J. Bruce Fields

From: J. Bruce Fields <[email protected]>

"nfsd: nfs4callback encode_stateid helper function" forgot to reserve more space after return from the new helper.

Quoted 7 lines
---
 fs/nfsd/nfs4callback.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Benny, maybe you could fix that patch and then pass it upstream?

Sure. I submitted this fix to the pnfs tree and will test and send a fixed version of "nfsd: nfs4callback encode_stateid helper function" upstream.

Benny

Quoted 15 lines

--b.

fs/nfsd/nfs4callback.c +1 -0
index b279738..238e0b8 100644
@@ -246,6 +246,7 @@ encode_cb_recall(struct xdr_stream *xdr, struct nfs4_delegation *dp,
 	RESERVE_SPACE(4);
 	WRITE32(OP_CB_RECALL);
 	encode_stateid(xdr, &dp->dl_stateid);
+	RESERVE_SPACE(8 + (XDR_QUADLEN(len) << 2));
 	WRITE32(0); /* truncate optimization not implemented */
 	WRITE32(len);
 	WRITEMEM(&dp->dl_fh.fh_base, len);
#2 lore raw
Quoted 12 lines · Benny Halevy
Quoted 11 lines · J. Bruce Fields

From: J. Bruce Fields <[email protected]>

"nfsd: nfs4callback encode_stateid helper function" forgot to reserve more space after return from the new helper.

---
 fs/nfsd/nfs4callback.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 5 lines
Quoted 1 line

Benny, maybe you could fix that patch and then pass it upstream?

Sure. I submitted this fix to the pnfs tree and will test and send a fixed version of "nfsd: nfs4callback encode_stateid helper function" upstream.

That's what I meant to say, yes, thanks!

--b.

Quoted 19 lines

Benny

Quoted 15 lines

--b.

fs/nfsd/nfs4callback.c +1 -0
index b279738..238e0b8 100644
@@ -246,6 +246,7 @@ encode_cb_recall(struct xdr_stream *xdr, struct nfs4_delegation *dp,
 	RESERVE_SPACE(4);
 	WRITE32(OP_CB_RECALL);
 	encode_stateid(xdr, &dp->dl_stateid);
+	RESERVE_SPACE(8 + (XDR_QUADLEN(len) << 2));
 	WRITE32(0); /* truncate optimization not implemented */
 	WRITE32(len);
 	WRITEMEM(&dp->dl_fh.fh_base, len);