PCI: Make pci_destroy_dev() concurrent safe
authorKeith Busch <kbusch@kernel.org>
Tue, 22 Oct 2024 22:48:48 +0000 (15:48 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 11 Nov 2024 19:06:02 +0000 (13:06 -0600)
commite3f30d563a388220a7c4e3b9a7b52ac0b0324b26
tree8a0fcef5bcf8b3f4618c0e333477e49505d566e7
parent93093ea1f05928b123dae38b710631362bef1601
PCI: Make pci_destroy_dev() concurrent safe

Use an atomic flag instead of the racy check against the device's kobj
parent. We shouldn't be poking into device implementation details at this
level anyway.

Link: https://lore.kernel.org/r/20241022224851.340648-3-kbusch@meta.com
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/pci/pci.h
drivers/pci/remove.c