[PATCH 1/2] scsi: aic7xxx: Fix potential critical section table leak
From: Guangshuo Li
Date: Tue Nov 03 2026 - 21:39:10 EST
ahc_loadseq() allocates a critical section table, but ahc_free()
does not release it. Free the table after shutting down the
controller and releasing its platform resources.
This issue was found by our static analysis tool under development.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Guangshuo Li <liguangshuo@xxxxxxxxxxxxxxx>
---
Build-tested the changed object with x86_64 GCC W=1, using defconfig
with the driver dependencies enabled. No hardware/kernel runtime test or full linked-kernel
build.
OpenAI Codex assisted with source review, patch implementation and
commit-message drafting. The submitter has reviewed the changes.
drivers/scsi/aic7xxx/aic7xxx_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
index b9761f9f0bbc..7959f96576ca 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_core.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
@@ -4514,6 +4514,7 @@ ahc_free(struct ahc_softc *ahc)
#endif
kfree(ahc->name);
kfree(ahc->seep_config);
+ kfree(ahc->critical_sections);
kfree(ahc);
return;
}