* [PATCH 5.15.y] PCI: Free released resource after coalescing
@ 2026-11-27 6:35 Dickson Wu via B4 Relay
2026-11-27 6:52 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Dickson Wu via B4 Relay @ 2026-11-27 6:35 UTC (permalink / raw)
To: stable; +Cc: Ross Lagerwall, Bjorn Helgaas, linux-pci
From: Ross Lagerwall <ross.lagerwall@citrix.com>
commit 8ec9c1d5d0a5a4744516adb483b97a238892f9d5 upstream.
release_resource() doesn't actually free the resource or resource list
entry so free the resource list entry to avoid a leak.
Closes: https://lore.kernel.org/r/878r9sga1t.fsf@kernel.org/
Fixes: e54223275ba1 ("PCI: Release resource invalidated by coalescing")
Link: https://lore.kernel.org/r/20230906110846.225369-1-ross.lagerwall@citrix.com
Reported-by: Kalle Valo <kvalo@kernel.org>
Tested-by: Kalle Valo <kvalo@kernel.org>
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable@vger.kernel.org # v5.16+
Signed-off-by: Dickson Wu <dickson.wu@certik.com>
---
6.1.y and newer already have this fix. 5.15.y has the coalescing
prerequisite as 26277a425020.
Tested on v5.15.226:
- x86_64 allmodconfig W=1 build of drivers/pci/probe.o, base vs
patched, no new warnings
- booted the patched kernel under QEMU/KVM. I didn't have a PCI
topology that hits the invalidated window path.
The backport and the test runs were prepared with AI coding tools
(OpenAI Codex agents, with review by Claude). I went over the result
before signing off.
drivers/pci/probe.c | 1 +
1 file changed, 1 insertion(+)
---
drivers/pci/probe.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 1403b1e50142..d5db12f13a22 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1001,6 +1001,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
res = window->res;
if (!res->flags && !res->start && !res->end) {
release_resource(res);
+ resource_list_destroy_entry(window);
continue;
}
---
base-commit: 4f2df9a01754521fbba3493e8ad91ef65515e68c
change-id: 20261127-so5-pci-515-300d989d806d
Best regards,
--
Dickson Wu <dickson.wu@certik.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 5.15.y] PCI: Free released resource after coalescing
2026-11-27 6:35 [PATCH 5.15.y] PCI: Free released resource after coalescing Dickson Wu via B4 Relay
@ 2026-11-27 6:52 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-27 6:52 UTC (permalink / raw)
To: Dickson Wu; +Cc: linux-pci
> From: Ross Lagerwall <ross.lagerwall@citrix.com>
>
> commit 8ec9c1d5d0a5a4744516adb483b97a238892f9d5 upstream.
>
> release_resource() doesn't actually free the resource or resource list
> entry so free the resource list entry to avoid a leak.
>
> Closes: https://lore.kernel.org/r/878r9sga1t.fsf@kernel.org/
> Fixes: e54223275ba1 ("PCI: Release resource invalidated by coalescing")
> Link: https://lore.kernel.org/r/20230906110846.225369-1-ross.lagerwall@citrix.com
> Reported-by: Kalle Valo <kvalo@kernel.org>
> Tested-by: Kalle Valo <kvalo@kernel.org>
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> Cc: stable@vger.kernel.org # v5.16+
> Signed-off-by: Dickson Wu <dickson.wu@certik.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261127-so5-pci-515-v1-1-58c7cedf2a45@certik.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-27 6:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 6:35 [PATCH 5.15.y] PCI: Free released resource after coalescing Dickson Wu via B4 Relay
2026-11-27 6:52 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox