* [PATCH] EDAC/pci: Fix potential private data leak on release
@ 2026-11-04 2:33 Guangshuo Li
2026-11-25 19:43 ` Yazen Ghannam
0 siblings, 1 reply; 2+ messages in thread
From: Guangshuo Li @ 2026-11-04 2:33 UTC (permalink / raw)
To: Borislav Petkov, Tony Luck; +Cc: linux-edac, linux-kernel
edac_pci_alloc_ctl_info() allocates pvt_info separately from the
controller, but the instance release callback only frees the
controller. Release the private allocation there as well, when
the final instance reference is dropped.
This issue was found by our static analysis tool under development.
Fixes: fb8cd45ca39b ("EDAC/pci: Get rid of the silly one-shot memory allocation in edac_pci_alloc_ctl_info()")
Signed-off-by: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
---
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/edac/edac_pci_sysfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
index 9f437f648e4e..cdb9291765e3 100644
--- a/drivers/edac/edac_pci_sysfs.c
+++ b/drivers/edac/edac_pci_sysfs.c
@@ -83,6 +83,7 @@ static void edac_pci_instance_release(struct kobject *kobj)
/* decrement reference count on top main kobj */
kobject_put(edac_pci_top_main_kobj);
+ kfree(pci->pvt_info);
kfree(pci); /* Free the control struct */
}
base-commit: 05441d697f7f9a927264f4058cbbc6a03dfcac9d
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] EDAC/pci: Fix potential private data leak on release
2026-11-04 2:33 [PATCH] EDAC/pci: Fix potential private data leak on release Guangshuo Li
@ 2026-11-25 19:43 ` Yazen Ghannam
0 siblings, 0 replies; 2+ messages in thread
From: Yazen Ghannam @ 2026-11-25 19:43 UTC (permalink / raw)
To: Guangshuo Li; +Cc: Borislav Petkov, Tony Luck, linux-edac, linux-kernel
On Wed, Nov 04, 2026 at 10:33:33AM +0800, Guangshuo Li wrote:
> edac_pci_alloc_ctl_info() allocates pvt_info separately from the
> controller, but the instance release callback only frees the
> controller. Release the private allocation there as well, when
> the final instance reference is dropped.
>
> This issue was found by our static analysis tool under development.
>
> Fixes: fb8cd45ca39b ("EDAC/pci: Get rid of the silly one-shot memory allocation in edac_pci_alloc_ctl_info()")
> Signed-off-by: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
> ---
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Thanks,
Yazen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-25 19:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 2:33 [PATCH] EDAC/pci: Fix potential private data leak on release Guangshuo Li
2026-11-25 19:43 ` Yazen Ghannam
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®