mirror of https://gitee.com/openkylin/linux.git
[SCSI] bfa: off by one in bfa_ioc_mbox_isr()
If mc == BFI_MC_MAX then we're reading past the end of the mod->mbhdlr[] array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
9e1a15376b
commit
fffa69230b
|
@ -2357,7 +2357,7 @@ bfa_ioc_mbox_isr(struct bfa_ioc_s *ioc)
|
|||
return;
|
||||
}
|
||||
|
||||
if ((mc > BFI_MC_MAX) || (mod->mbhdlr[mc].cbfn == NULL))
|
||||
if ((mc >= BFI_MC_MAX) || (mod->mbhdlr[mc].cbfn == NULL))
|
||||
return;
|
||||
|
||||
mod->mbhdlr[mc].cbfn(mod->mbhdlr[mc].cbarg, &m);
|
||||
|
|
Loading…
Reference in New Issue