]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Revert "PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root()"
authorZhe Qiao <qiaozhe@iscas.ac.cn>
Thu, 19 Jun 2025 07:26:08 +0000 (15:26 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 23 Jun 2025 20:15:45 +0000 (22:15 +0200)
commit2b8be57fa0c88ac824a906f29c04d728f9f6047a
tree0eb27ceb6c2baa7f1078f67512718d28e5ae8b0a
parent86731a2a651e58953fc949573895f2fa6d456841
Revert "PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root()"

This reverts commit 631b2af2f357 ("PCI/ACPI: Fix allocated memory release
on error in pci_acpi_scan_root()").

The reverted patch causes the 'ri->cfg' and 'root_ops' resources to be
released multiple times.

When acpi_pci_root_create() fails, these resources have already been
released internally by the __acpi_pci_root_release_info() function.

Releasing them again in pci_acpi_scan_root() leads to incorrect behavior
and potential memory issues.

We plan to resolve the issue using a more appropriate fix.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/aEmdnuw715btq7Q5@stanley.mountain/
Signed-off-by: Zhe Qiao <qiaozhe@iscas.ac.cn>
Acked-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/20250619072608.2075475-1-qiaozhe@iscas.ac.cn
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pci/pci-acpi.c