scsi: bvme6000: put SCSI host on remove
Subsystems (2)
PATCH 1/1 scsi: bvme6000: put SCSI host on remove
bvme6000_probe() obtains a SCSI host through NCR_700_detect(). The probe failure path drops the host reference with scsi_host_put(), but the normal remove path does not perform the corresponding cleanup.
As a result, the SCSI host reference remains allocated after the driver is removed.
Call scsi_host_put() after the IRQ has been released to drop the host reference acquired during probe.
This issue was found by manual code inspection.
Fixes 8276b58af4dd ("[SCSI] 53c700: m68k BVME6000 NCR53C710 SCSI")
Signed-off-by Guangshuo Li <[email protected]>
--- drivers/scsi/bvme6000_scsi.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/bvme6000_scsi.c +1 -0
@@ -99,6 +99,7 @@ bvme6000_device_remove(struct platform_device *dev)NCR_700_release (host);kfree (hostdata);free_irq (host->irq, host); +scsi_host_put (host); }static struct platform_driver bvme6000_scsi_driver = {
Signature · 1 line
2.43.0