]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
qla2xxx: Declaration error cause stack corruption.
authorQuinn Tran <quinn.tran@qlogic.com>
Thu, 25 Sep 2014 09:16:53 +0000 (05:16 -0400)
committerChristoph Hellwig <hch@lst.de>
Thu, 25 Sep 2014 12:25:04 +0000 (14:25 +0200)
Declaration error of mb array in qla2x00_iidma_fcport cause data
to be written beyond the array. This ends up causing stack corruption.

Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/qla2xxx/qla_init.c

index d5b10ecde4a03e4a9b312839b577bf43442c7627..ab22ccf4c7d3ad16db819facb88a7890f2f32663 100644 (file)
@@ -3192,7 +3192,7 @@ static void
 qla2x00_iidma_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
 {
        int rval;
-       uint16_t mb[4];
+       uint16_t mb[MAILBOX_REGISTER_COUNT];
        struct qla_hw_data *ha = vha->hw;
 
        if (!IS_IIDMA_CAPABLE(ha))