lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220607145138.10766-1-xiaohuizhang@ruc.edu.cn>
Date:   Tue,  7 Jun 2022 22:51:38 +0800
From:   Xiaohui Zhang <xiaohuizhang@....edu.cn>
To:     Xiaohui Zhang <xiaohuizhang@....edu.cn>,
        "James E . J . Bottomley" <jejb@...ux.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] scsi: bvme6000_scsi: Fix a resource leak in bvme6000_device_remove()

Similar to the handling of zorro7xx_remove_one in commit 16ed828b872d
("scsi: zorro7xx: Fix a resource leak in zorro7xx_remove_one()"), we
thought a patch might be needed here as well.

The error handling path of the probe releases a resource that is not freed
in the remove function. In some cases, a ioremap() must be undone.

Add the missing iounmap() call in the remove function.

Signed-off-by: Xiaohui Zhang <xiaohuizhang@....edu.cn>
---
 drivers/scsi/bvme6000_scsi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c
index 8d72b25535c5..773254c9315b 100644
--- a/drivers/scsi/bvme6000_scsi.c
+++ b/drivers/scsi/bvme6000_scsi.c
@@ -97,6 +97,8 @@ bvme6000_device_remove(struct platform_device *dev)
 
 	scsi_remove_host(host);
 	NCR_700_release(host);
+	if (host->base > 0x01000000)
+		iounmap(hostdata->base);
 	kfree(hostdata);
 	free_irq(host->irq, host);
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ