[PATCH 2/2] scsi: aic79xx: Fix potential critical section table leak
From: Guangshuo Li
Date: Tue Nov 03 2026 - 21:34:35 EST
ahd_loadseq() allocates a critical section table, but ahd_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/aic79xx_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
index 3602a1fc40e4..1ef088b54a28 100644
--- a/drivers/scsi/aic7xxx/aic79xx_core.c
+++ b/drivers/scsi/aic7xxx/aic79xx_core.c
@@ -6167,6 +6167,7 @@ ahd_free(struct ahd_softc *ahd)
kfree(ahd->name);
kfree(ahd->seep_config);
kfree(ahd->saved_stack);
+ kfree(ahd->critical_sections);
kfree(ahd);
return;
}