* [PATCH 1/2] scsi: aic79xx: Disable the PCI device on removal
@ 2026-09-15 1:02 Myeonghun Pak
2026-09-15 1:02 ` [PATCH 2/2] scsi: aic79xx: Disable PCI on configuration failure Myeonghun Pak
0 siblings, 1 reply; 2+ messages in thread
From: Myeonghun Pak @ 2026-09-15 1:02 UTC (permalink / raw)
To: Hannes Reinecke, James E.J. Bottomley, Martin K. Petersen
Cc: linux-scsi, linux-kernel, stable
ahd_linux_pci_dev_probe() enables the PCI device, but removal leaves
its enable reference outstanding. Disable it after ahd_free() has
finished shutting down the controller and releasing its resources.
The imbalance is already present in the initial Git import.
This issue was identified during our ongoing static-analysis research
while reviewing kernel code.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
--- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
@@ -113,6 +113,7 @@ ahd_linux_pci_dev_remove(struct pci_dev *pdev)
ahd_intr_enable(ahd, FALSE);
ahd_unlock(ahd, &s);
ahd_free(ahd);
+ pci_disable_device(pdev);
}
static void
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 2/2] scsi: aic79xx: Disable PCI on configuration failure
2026-09-15 1:02 [PATCH 1/2] scsi: aic79xx: Disable the PCI device on removal Myeonghun Pak
@ 2026-09-15 1:02 ` Myeonghun Pak
0 siblings, 0 replies; 2+ messages in thread
From: Myeonghun Pak @ 2026-09-15 1:02 UTC (permalink / raw)
To: Hannes Reinecke, James E.J. Bottomley, Martin K. Petersen
Cc: linux-scsi, linux-kernel, stable
ahd_linux_pci_dev_probe() enables the PCI device before calling
ahd_pci_config(). If configuration fails, ahd_free() releases the
controller resources but leaves the PCI enable reference outstanding.
The remove callback is not called for a failed probe.
Disable the PCI device after ahd_free() on this error path. The
imbalance already exists in the initial Git import.
This issue was identified during our ongoing static-analysis research
while reviewing kernel code.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
index 5fba316..37f4395 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
@@ -189,6 +189,7 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
error = ahd_pci_config(ahd, entry);
if (error != 0) {
ahd_free(ahd);
+ pci_disable_device(pdev);
return (-error);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-15 1:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 1:02 [PATCH 1/2] scsi: aic79xx: Disable the PCI device on removal Myeonghun Pak
2026-09-15 1:02 ` [PATCH 2/2] scsi: aic79xx: Disable PCI on configuration failure Myeonghun Pak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®