Skip to content

Commit

Permalink
scsi: qla2xxx: Increase the size of the mailbox arrays from 4 to 8
Browse files Browse the repository at this point in the history
This patch avoids that Coverity complains that qla2x00_async_event() writes
outside the bounds of the mb[] arrays (MBA_IDC_AEN case).

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Bart Van Assche authored and Martin K. Petersen committed Apr 29, 2019
1 parent 3f918ff commit 0a59cea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/qla2xxx/qla_isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ qla2100_intr_handler(int irq, void *dev_id)
int status;
unsigned long iter;
uint16_t hccr;
uint16_t mb[4];
uint16_t mb[8];
struct rsp_que *rsp;
unsigned long flags;

Expand Down Expand Up @@ -168,7 +168,7 @@ qla2300_intr_handler(int irq, void *dev_id)
unsigned long iter;
uint32_t stat;
uint16_t hccr;
uint16_t mb[4];
uint16_t mb[8];
struct rsp_que *rsp;
struct qla_hw_data *ha;
unsigned long flags;
Expand Down
6 changes: 3 additions & 3 deletions drivers/scsi/qla2xxx/qla_nx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2039,7 +2039,7 @@ qla82xx_intr_handler(int irq, void *dev_id)
unsigned long flags;
unsigned long iter;
uint32_t stat = 0;
uint16_t mb[4];
uint16_t mb[8];

rsp = (struct rsp_que *) dev_id;
if (!rsp) {
Expand Down Expand Up @@ -2123,7 +2123,7 @@ qla82xx_msix_default(int irq, void *dev_id)
unsigned long flags;
uint32_t stat = 0;
uint32_t host_int = 0;
uint16_t mb[4];
uint16_t mb[8];

rsp = (struct rsp_que *) dev_id;
if (!rsp) {
Expand Down Expand Up @@ -2219,7 +2219,7 @@ qla82xx_poll(int irq, void *dev_id)
int status = 0;
uint32_t stat;
uint32_t host_int = 0;
uint16_t mb[4];
uint16_t mb[8];
unsigned long flags;

rsp = (struct rsp_que *) dev_id;
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/qla2xxx/qla_nx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3895,7 +3895,7 @@ qla8044_intr_handler(int irq, void *dev_id)
unsigned long flags;
unsigned long iter;
uint32_t stat;
uint16_t mb[4];
uint16_t mb[8];
uint32_t leg_int_ptr = 0, pf_bit;

rsp = (struct rsp_que *) dev_id;
Expand Down

0 comments on commit 0a59cea

Please sign in to comment.