forked from Minki/linux
bna: off by one in bfa_msgq_rspq_pi_update()
The rspq->rsphdlr[] array has BFI_MC_MAX elements, so this test was off by one. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
44861f4455
commit
18cf1248ec
@ -483,7 +483,7 @@ bfa_msgq_rspq_pi_update(struct bfa_msgq_rspq *rspq, struct bfi_mbmsg *mb)
|
||||
mc = msghdr->msg_class;
|
||||
num_entries = ntohs(msghdr->num_entries);
|
||||
|
||||
if ((mc > BFI_MC_MAX) || (rspq->rsphdlr[mc].cbfn == NULL))
|
||||
if ((mc >= BFI_MC_MAX) || (rspq->rsphdlr[mc].cbfn == NULL))
|
||||
break;
|
||||
|
||||
(rspq->rsphdlr[mc].cbfn)(rspq->rsphdlr[mc].cbarg, msghdr);
|
||||
|
Loading…
Reference in New Issue
Block a user