提交 18cf1248 编写于 作者: D Dan Carpenter 提交者: David S. Miller

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: NDan Carpenter <error27@gmail.com>
Acked-by: NRasesh Mody <rmody@brocade.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 44861f44
无相关合并请求
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部