diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-06-27 12:59:36 +0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-07-20 11:58:37 +0400 |
commit | fffa69230b7bbfc62d8cfb515c3e658224a0f88c (patch) | |
tree | 6262e3adfbd29308650c46f529888d4bf5b5d464 /drivers/scsi/bfa/bfa_ioc.c | |
parent | 9e1a15376bce2fc7746145eb8ee78a3674658bc8 (diff) | |
download | linux-fffa69230b7bbfc62d8cfb515c3e658224a0f88c.tar.xz |
[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>
Diffstat (limited to 'drivers/scsi/bfa/bfa_ioc.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index 14e6284e48e4..8cdb79c2fcdf 100644 --- a/drivers/scsi/bfa/bfa_ioc.c +++ b/drivers/scsi/bfa/bfa_ioc.c @@ -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); |