]> Git Repo - J-linux.git/commitdiff
PCI: Free released resource after coalescing
authorRoss Lagerwall <[email protected]>
Wed, 6 Sep 2023 11:08:46 +0000 (12:08 +0100)
committerBjorn Helgaas <[email protected]>
Wed, 6 Sep 2023 17:19:29 +0000 (12:19 -0500)
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/[email protected]/
Fixes: e54223275ba1 ("PCI: Release resource invalidated by coalescing")
Link: https://lore.kernel.org/r/[email protected]
Reported-by: Kalle Valo <[email protected]>
Tested-by: Kalle Valo <[email protected]>
Signed-off-by: Ross Lagerwall <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: [email protected] # v5.16+
drivers/pci/probe.c

index ab2a4a3a4c06e31b833ff309e3068eaa67a247a4..795534589b98503c75055b2a09df889057532d38 100644 (file)
@@ -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;
                }
 
This page took 0.058064 seconds and 4 git commands to generate.