linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug
@ 2011-10-18  6:39 andros
  2011-11-04 14:31 ` Myklebust, Trond
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: andros @ 2011-10-18  6:39 UTC (permalink / raw)
  To: trond.myklebust; +Cc: linux-nfs, Andy Adamson

From: Andy Adamson <andros@netapp.com>

Slotid's start from 0 which means we check against
NFS41_BC_MAX_CALLBACKS - 1.

Signed-off-by: Andy Adamson <andros@netapp.com>
---
 fs/nfs/callback_proc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 98ff5fc..12bd9d0 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -339,7 +339,7 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)
 	dprintk("%s enter. slotid %d seqid %d\n",
 		__func__, args->csa_slotid, args->csa_sequenceid);
 
-	if (args->csa_slotid > NFS41_BC_MAX_CALLBACKS)
+	if (args->csa_slotid > NFS41_BC_MAX_CALLBACKS - 1)
 		return htonl(NFS4ERR_BADSLOT);
 
 	slot = nfs4_lookup_slot_locked(tbl, args->csa_slotid);
-- 
1.7.6.4


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

* RE: [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug
  2011-10-18  6:39 [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug andros
@ 2011-11-04 14:31 ` Myklebust, Trond
  2011-11-04 14:34 ` Myklebust, Trond
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Myklebust, Trond @ 2011-11-04 14:31 UTC (permalink / raw)
  To: Adamson, Andy; +Cc: linux-nfs

> -----Original Message-----
> From: Adamson, Andy
> Sent: Tuesday, October 18, 2011 2:40 AM
> To: Myklebust, Trond
> Cc: linux-nfs@vger.kernel.org; Adamson, Andy
> Subject: [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug
> 
> From: Andy Adamson <andros@netapp.com>
> 
> Slotid's start from 0 which means we check against
> NFS41_BC_MAX_CALLBACKS - 1.
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
>  fs/nfs/callback_proc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index
> 98ff5fc..12bd9d0 100644
> --- a/fs/nfs/callback_proc.c
> +++ b/fs/nfs/callback_proc.c
> @@ -339,7 +339,7 @@ validate_seqid(struct nfs4_slot_table *tbl, struct
> cb_sequenceargs * args)
>  	dprintk("%s enter. slotid %d seqid %d\n",
>  		__func__, args->csa_slotid, args->csa_sequenceid);
> 
> -	if (args->csa_slotid > NFS41_BC_MAX_CALLBACKS)
> +	if (args->csa_slotid > NFS41_BC_MAX_CALLBACKS - 1)
>  		return htonl(NFS4ERR_BADSLOT);

Why not just replace '>' with '>='?

Cheers
  Trond

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

* RE: [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug
  2011-10-18  6:39 [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug andros
  2011-11-04 14:31 ` Myklebust, Trond
@ 2011-11-04 14:34 ` Myklebust, Trond
  2011-11-04 14:40 ` Bryan Schumaker
  2011-11-04 14:43 ` Jim Rees
  3 siblings, 0 replies; 5+ messages in thread
From: Myklebust, Trond @ 2011-11-04 14:34 UTC (permalink / raw)
  To: Adamson, Andy; +Cc: linux-nfs

> -----Original Message-----
> From: Myklebust, Trond
> Sent: Friday, November 04, 2011 10:32 AM
> To: Adamson, Andy
> Cc: linux-nfs@vger.kernel.org
> Subject: RE: [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel
bug
> 
> > -----Original Message-----
> > From: Adamson, Andy
> > Sent: Tuesday, October 18, 2011 2:40 AM
> > To: Myklebust, Trond
> > Cc: linux-nfs@vger.kernel.org; Adamson, Andy
> > Subject: [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug
> >
> > From: Andy Adamson <andros@netapp.com>
> >
> > Slotid's start from 0 which means we check against
> > NFS41_BC_MAX_CALLBACKS - 1.
> >
> > Signed-off-by: Andy Adamson <andros@netapp.com>
> > ---
> >  fs/nfs/callback_proc.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index
> > 98ff5fc..12bd9d0 100644
> > --- a/fs/nfs/callback_proc.c
> > +++ b/fs/nfs/callback_proc.c
> > @@ -339,7 +339,7 @@ validate_seqid(struct nfs4_slot_table *tbl,
struct
> > cb_sequenceargs * args)
> >  	dprintk("%s enter. slotid %d seqid %d\n",
> >  		__func__, args->csa_slotid, args->csa_sequenceid);
> >
> > -	if (args->csa_slotid > NFS41_BC_MAX_CALLBACKS)
> > +	if (args->csa_slotid > NFS41_BC_MAX_CALLBACKS - 1)
> >  		return htonl(NFS4ERR_BADSLOT);
> 
> Why not just replace '>' with '>='?

BTW: Shouldn't this patch be 1/3 and be Cc: stable@vger.kernel.org? It
looks as if it ought to be backported to the stable kernels...

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

* Re: [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug
  2011-10-18  6:39 [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug andros
  2011-11-04 14:31 ` Myklebust, Trond
  2011-11-04 14:34 ` Myklebust, Trond
@ 2011-11-04 14:40 ` Bryan Schumaker
  2011-11-04 14:43 ` Jim Rees
  3 siblings, 0 replies; 5+ messages in thread
From: Bryan Schumaker @ 2011-11-04 14:40 UTC (permalink / raw)
  To: andros; +Cc: trond.myklebust, linux-nfs

"backchennel" in the subject should be "backchannel"

- Bryan

On 10/18/2011 02:39 AM, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
> 
> Slotid's start from 0 which means we check against
> NFS41_BC_MAX_CALLBACKS - 1.
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
>  fs/nfs/callback_proc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
> index 98ff5fc..12bd9d0 100644
> --- a/fs/nfs/callback_proc.c
> +++ b/fs/nfs/callback_proc.c
> @@ -339,7 +339,7 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)
>  	dprintk("%s enter. slotid %d seqid %d\n",
>  		__func__, args->csa_slotid, args->csa_sequenceid);
>  
> -	if (args->csa_slotid > NFS41_BC_MAX_CALLBACKS)
> +	if (args->csa_slotid > NFS41_BC_MAX_CALLBACKS - 1)
>  		return htonl(NFS4ERR_BADSLOT);
>  
>  	slot = nfs4_lookup_slot_locked(tbl, args->csa_slotid);


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

* Re: [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug
  2011-10-18  6:39 [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug andros
                   ` (2 preceding siblings ...)
  2011-11-04 14:40 ` Bryan Schumaker
@ 2011-11-04 14:43 ` Jim Rees
  3 siblings, 0 replies; 5+ messages in thread
From: Jim Rees @ 2011-11-04 14:43 UTC (permalink / raw)
  To: andros; +Cc: trond.myklebust, linux-nfs

You misspelled "backchannel" in the description.  Also could be a bit more
descriptive:

NFSv4.1: fix backchannel slotid off-by-one bug

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

end of thread, other threads:[~2011-11-04 14:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-18  6:39 [PATCH (resend) Version 2 3/3] NFSv4.1: fix backchennel bug andros
2011-11-04 14:31 ` Myklebust, Trond
2011-11-04 14:34 ` Myklebust, Trond
2011-11-04 14:40 ` Bryan Schumaker
2011-11-04 14:43 ` Jim Rees

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