Parcourir la source

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

Cc:stable@kernel.org
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Andy Adamson il y a 13 ans
Parent
commit
61f2e51065
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      fs/nfs/callback_proc.c

+ 1 - 1
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",
 	dprintk("%s enter. slotid %d seqid %d\n",
 		__func__, args->csa_slotid, args->csa_sequenceid);
 		__func__, args->csa_slotid, args->csa_sequenceid);
 
 
-	if (args->csa_slotid > NFS41_BC_MAX_CALLBACKS)
+	if (args->csa_slotid >= NFS41_BC_MAX_CALLBACKS)
 		return htonl(NFS4ERR_BADSLOT);
 		return htonl(NFS4ERR_BADSLOT);
 
 
 	slot = tbl->slots + args->csa_slotid;
 	slot = tbl->slots + args->csa_slotid;