Commit 2b8be57
Revert "PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root()"
This reverts commit 631b2af ("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>1 parent 86731a2 commit 2b8be57
1 file changed
Lines changed: 10 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1676 | 1676 | | |
1677 | 1677 | | |
1678 | 1678 | | |
1679 | | - | |
1680 | | - | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
1681 | 1683 | | |
1682 | 1684 | | |
1683 | | - | |
1684 | | - | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
1685 | 1690 | | |
1686 | 1691 | | |
1687 | 1692 | | |
1688 | 1693 | | |
1689 | 1694 | | |
1690 | 1695 | | |
1691 | | - | |
| 1696 | + | |
1692 | 1697 | | |
1693 | 1698 | | |
1694 | 1699 | | |
| |||
1705 | 1710 | | |
1706 | 1711 | | |
1707 | 1712 | | |
1708 | | - | |
1709 | | - | |
1710 | | - | |
1711 | | - | |
1712 | | - | |
1713 | | - | |
1714 | | - | |
1715 | | - | |
1716 | 1713 | | |
1717 | 1714 | | |
1718 | 1715 | | |
| |||
0 commit comments