Commit 30d26f5c authored by Joe Lawrence's avatar Joe Lawrence Committed by Greg Kroah-Hartman

qla2xxx: Fix shost use-after-free on device removal

commit db7157d4 upstream.

Once calling scsi_host_put, be careful to not access qla_hw_data through
the Scsi_Host private data (ie, scsi_qla_host base_vha).

Fixes: fe1b806f ("qla2xxx: Refactor shutdown code so some functionality can be reused")
Signed-off-by: default avatarJoe Lawrence <joe.lawrence@stratus.com>
Acked-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 54bf501e
......@@ -3111,10 +3111,8 @@ qla2x00_unmap_iobases(struct qla_hw_data *ha)
}
static void
qla2x00_clear_drv_active(scsi_qla_host_t *vha)
qla2x00_clear_drv_active(struct qla_hw_data *ha)
{
struct qla_hw_data *ha = vha->hw;
if (IS_QLA8044(ha)) {
qla8044_idc_lock(ha);
qla8044_clear_drv_active(ha);
......@@ -3185,7 +3183,7 @@ qla2x00_remove_one(struct pci_dev *pdev)
scsi_host_put(base_vha->host);
qla2x00_clear_drv_active(base_vha);
qla2x00_clear_drv_active(ha);
qla2x00_unmap_iobases(ha);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment