Commit fffa69230b7bbfc62d8cfb515c3e658224a0f88c

Authored by Dan Carpenter
Committed by James Bottomley
1 parent 9e1a15376b

[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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/scsi/bfa/bfa_ioc.c
... ... @@ -2357,7 +2357,7 @@
2357 2357 return;
2358 2358 }
2359 2359  
2360   - if ((mc > BFI_MC_MAX) || (mod->mbhdlr[mc].cbfn == NULL))
  2360 + if ((mc >= BFI_MC_MAX) || (mod->mbhdlr[mc].cbfn == NULL))
2361 2361 return;
2362 2362  
2363 2363 mod->mbhdlr[mc].cbfn(mod->mbhdlr[mc].cbarg, &m);