diff options
author | Ross Lagerwall <ross.lagerwall@citrix.com> | 2023-09-06 14:08:46 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2023-09-06 20:19:29 +0300 |
commit | 8ec9c1d5d0a5a4744516adb483b97a238892f9d5 (patch) | |
tree | f4c1cae00c45febf03a5761760f175cb24e4ba1f /drivers/pci/probe.c | |
parent | 26641b3f22abe3f03bd8e078c116cc98de740f43 (diff) | |
download | linux-8ec9c1d5d0a5a4744516adb483b97a238892f9d5.tar.xz |
PCI: Free released resource after coalescing
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+
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index ab2a4a3a4c06..795534589b98 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -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; } |