summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2019-11-05 10:25:27 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2019-11-20 03:37:34 +0100
commit3fe3d2428b62822b7b030577cd612790bdd8c941 (patch)
tree8eb52f5d9d0a7d0772dce138eb0cebf5ae543c1c /drivers/scsi
parentscsi: pm80xx: Modified the logic to collect fatal dump (diff)
downloadlinux-3fe3d2428b62822b7b030577cd612790bdd8c941.tar.xz
linux-3fe3d2428b62822b7b030577cd612790bdd8c941.zip
scsi: qla4xxx: fix double free bug
The variable init_fw_cb is released twice, resulting in a double free bug. The call to the function dma_free_coherent() before goto is removed to get rid of potential double free. Fixes: 2a49a78ed3c8 ("[SCSI] qla4xxx: added IPv6 support.") Link: https://lore.kernel.org/r/1572945927-27796-1-git-send-email-bianpan2016@163.com Signed-off-by: Pan Bian <bianpan2016@163.com> Acked-by: Manish Rangankar <mrangankar@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla4xxx/ql4_mbx.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index dac9a7013208..02636b4785c5 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
@@ -640,9 +640,6 @@ int qla4xxx_initialize_fw_cb(struct scsi_qla_host * ha)
if (qla4xxx_get_ifcb(ha, &mbox_cmd[0], &mbox_sts[0], init_fw_cb_dma) !=
QLA_SUCCESS) {
- dma_free_coherent(&ha->pdev->dev,
- sizeof(struct addr_ctrl_blk),
- init_fw_cb, init_fw_cb_dma);
goto exit_init_fw_cb;
}