PCI: Free released resource
Subsystems (2)
PATCH 1/1 PCI: Free released resource
release_resource() doesn't actually free the resource or resource list entry so free the resource list entry to avoid a leak.
Fixes e54223275ba1 ("PCI: Release resource invalidated by coalescing")
Signed-off-by Ross Lagerwall <[email protected]>
Reported-by Kalle Valo <[email protected]>
Tested-by Kalle Valo <[email protected]>
Cc [email protected] # v5.16+
--- drivers/pci/probe.c | 1 + 1 file changed, 1 insertion(+)
drivers/pci/probe.c +1 -0
@@ -997,6 +997,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 ; }
Signature · 1 line
2.41.0
Bjorn Helgaas
AppliedQuoted 9 lines · Ross Lagerwall
release_resource()doesn't actually free the resource or resource list entry so free the resource list entry to avoid a leak.Fixes e54223275ba1 ("PCI: Release resource invalidated by coalescing")Signed-off-by Ross Lagerwall <[email protected]>Reported-by Kalle Valo <[email protected]>Tested-by Kalle Valo <[email protected]>Cc [email protected] # v5.16+
Applied to for-linus for v6.6-rc1.
Quoted 19 lines
--- drivers/pci/probe.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/probe.c +1
-0@@ -997,6 +997,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 ; }Signature · 1 line
2.41.0