From: Andy Adamson Date: Wed, 9 Nov 2011 18:58:20 +0000 (-0500) Subject: NFSv4.1: fix backchannel slotid off-by-one bug X-Git-Tag: firefly_0821_release~3680^2~3768^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=61f2e5106582d02f30b6807e3f9c07463c572ccb;p=firefly-linux-kernel-4.4.55.git NFSv4.1: fix backchannel slotid off-by-one bug Cc:stable@kernel.org Signed-off-by: Andy Adamson Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 43926add945b..54cea8ad5a76 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) return htonl(NFS4ERR_BADSLOT); slot = tbl->slots + args->csa_slotid;