[PATCH 9/9] PCI: plda: Protect root bus removal with rescan lock

From: Hans Zhang

Date: Thu May 21 2026 - 12:47:06 EST


Add missing lock acquisition in plda_pcie_host_deinit() before
stopping/removing the root bus.

Signed-off-by: Hans Zhang <18255117159@xxxxxxx>
---
drivers/pci/controller/plda/pcie-plda-host.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/pci/controller/plda/pcie-plda-host.c b/drivers/pci/controller/plda/pcie-plda-host.c
index 3c2f68383010..f9a34f323ad8 100644
--- a/drivers/pci/controller/plda/pcie-plda-host.c
+++ b/drivers/pci/controller/plda/pcie-plda-host.c
@@ -640,8 +640,10 @@ EXPORT_SYMBOL_GPL(plda_pcie_host_init);

void plda_pcie_host_deinit(struct plda_pcie_rp *port)
{
+ pci_lock_rescan_remove();
pci_stop_root_bus(port->bridge->bus);
pci_remove_root_bus(port->bridge->bus);
+ pci_unlock_rescan_remove();

plda_pcie_irq_domain_deinit(port);

--
2.34.1