diff options
author | Lv Yunlong <lyl2019@mail.ustc.edu.cn> | 2021-03-11 09:30:05 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-03-16 05:50:01 +0300 |
commit | 2bb817712e2f77486d6ee17e7efaf91997a685f8 (patch) | |
tree | af64e6deb858d4a3a4227778ed9ab898d592c5da /drivers/scsi/myrs.c | |
parent | febb0cc847e7efd0b2b6cabf9f0e82b13dbadbec (diff) | |
download | linux-2bb817712e2f77486d6ee17e7efaf91997a685f8.tar.xz |
scsi: myrs: Fix a double free in myrs_cleanup()
In myrs_cleanup(), cs->mmio_base will be freed twice by iounmap().
Link: https://lore.kernel.org/r/20210311063005.9963-1-lyl2019@mail.ustc.edu.cn
Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)")
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/myrs.c')
-rw-r--r-- | drivers/scsi/myrs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index 4adf9ded296a..329fd025c718 100644 --- a/drivers/scsi/myrs.c +++ b/drivers/scsi/myrs.c @@ -2273,12 +2273,12 @@ static void myrs_cleanup(struct myrs_hba *cs) if (cs->mmio_base) { cs->disable_intr(cs); iounmap(cs->mmio_base); + cs->mmio_base = NULL; } if (cs->irq) free_irq(cs->irq, cs); if (cs->io_addr) release_region(cs->io_addr, 0x80); - iounmap(cs->mmio_base); pci_set_drvdata(pdev, NULL); pci_disable_device(pdev); scsi_host_put(cs->host); |