PCI: Protect pci_reassign_bridge_resources() against concurrent addition/removal
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 25 Sep 2019 01:16:55 +0000 (11:16 +1000)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 30 Sep 2019 19:53:31 +0000 (14:53 -0500)
commitfb794a708a71d7c6af55f04cc4ed2d5823fb8b33
tree4343000cc3fd5f453cd8a6943330ad1a25840ccb
parent54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c
PCI: Protect pci_reassign_bridge_resources() against concurrent addition/removal

pci_reassign_bridge_resources() can be called by pci_resize_resource() at
runtime, it walks the PCI tree up and down, and it isn't currently
protected against any changes or hotplug operation.

Hold the pci_bus_sem to protect it.

Link: https://lore.kernel.org/r/7339fd73ccaf58552737ab10008333fd9f7723f2.camel@kernel.crashing.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/setup-bus.c