[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250616084420.526381-1-qiaozhe@iscas.ac.cn>
Date: Mon, 16 Jun 2025 16:44:20 +0800
From: Zhe Qiao <qiaozhe@...as.ac.cn>
To: sashal@...nel.org,
rafael@...nel.org,
lenb@...nel.org,
bhelgaas@...gle.com,
kwilczynski@...nel.org,
qiaozhe@...as.ac.cn
Cc: linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org,
linux-acpi@...r.kernel.org
Subject: [PATCH] PCI/ACPI: Fix double free bug in pci_acpi_scan_root() function
Fix the double free bug introduced in the patch "PCI/ACPI: Fix
allocated memory release on error in pci_acpi_scan_root()".
Fixes: 631b2af2f357 ("PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root()")
Signed-off-by: Zhe Qiao <qiaozhe@...as.ac.cn>
---
drivers/pci/pci-acpi.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index b78e0e417324..49b72596ae37 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -1653,15 +1653,7 @@ pci_acpi_setup_ecam_mapping(struct acpi_pci_root *root)
}
/* release_info: free resources allocated by init_info */
-static void pci_acpi_generic_release_info(struct acpi_pci_root_info *ci)
-{
- struct acpi_pci_generic_root_info *ri;
-
- ri = container_of(ci, struct acpi_pci_generic_root_info, common);
- pci_ecam_free(ri->cfg);
- kfree(ci->ops);
- kfree(ri);
-}
+static void pci_acpi_generic_release_info(struct acpi_pci_root_info *ci) {}
/* Interface called from ACPI code to setup PCI host controller */
struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
--
2.43.0
Powered by blists - more mailing lists