linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] SQUASHME: nfsd4: fix cb_recall encoding
@ 2010-05-24 15:28 J. Bruce Fields
  2010-05-25  6:14 ` Benny Halevy
  0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2010-05-24 15:28 UTC (permalink / raw)
  To: Benny Halevy; +Cc: linux-nfs, Michael Groshans

From: J. Bruce Fields <bfields@citi.umich.edu>

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

Reported-by: Michael Groshans <groshans@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 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.

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index b279738..238e0b8 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -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);
-- 
1.7.0.4


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

* Re: [PATCH] SQUASHME: nfsd4: fix cb_recall encoding
  2010-05-24 15:28 [PATCH] SQUASHME: nfsd4: fix cb_recall encoding J. Bruce Fields
@ 2010-05-25  6:14 ` Benny Halevy
  2010-05-25 18:49   ` J. Bruce Fields
  0 siblings, 1 reply; 3+ messages in thread
From: Benny Halevy @ 2010-05-25  6:14 UTC (permalink / raw)
  To: J. Bruce Fields, Michael Groshans; +Cc: linux-nfs

On May. 24, 2010, 18:28 +0300, "J. Bruce Fields" <bfields@fieldses.org> wrote:
> From: J. Bruce Fields <bfields@citi.umich.edu>
> 
> "nfsd: nfs4callback encode_stateid helper function" forgot to reserve
> more space after return from the new helper.
> 
> Reported-by: Michael Groshans <groshans@citi.umich.edu>
> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
> ---
>  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

> 
> --b.
> 
> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> index b279738..238e0b8 100644
> --- a/fs/nfsd/nfs4callback.c
> +++ b/fs/nfsd/nfs4callback.c
> @@ -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);


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

* Re: [PATCH] SQUASHME: nfsd4: fix cb_recall encoding
  2010-05-25  6:14 ` Benny Halevy
@ 2010-05-25 18:49   ` J. Bruce Fields
  0 siblings, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2010-05-25 18:49 UTC (permalink / raw)
  To: Benny Halevy; +Cc: Michael Groshans, linux-nfs

On Tue, May 25, 2010 at 09:14:02AM +0300, Benny Halevy wrote:
> On May. 24, 2010, 18:28 +0300, "J. Bruce Fields" <bfields@fieldses.org> wrote:
> > From: J. Bruce Fields <bfields@citi.umich.edu>
> > 
> > "nfsd: nfs4callback encode_stateid helper function" forgot to reserve
> > more space after return from the new helper.
> > 
> > Reported-by: Michael Groshans <groshans@citi.umich.edu>
> > Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
> > ---
> >  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.

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

--b.

> 
> Benny
> 
> > 
> > --b.
> > 
> > diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> > index b279738..238e0b8 100644
> > --- a/fs/nfsd/nfs4callback.c
> > +++ b/fs/nfsd/nfs4callback.c
> > @@ -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);
> 

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

end of thread, other threads:[~2010-05-25 18:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-24 15:28 [PATCH] SQUASHME: nfsd4: fix cb_recall encoding J. Bruce Fields
2010-05-25  6:14 ` Benny Halevy
2010-05-25 18:49   ` 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).