Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit cb5e0d06 authored by Sinan Kaya's avatar Sinan Kaya Committed by Bjorn Helgaas
Browse files

PCI: Protect restore with device lock to be consistent



Commit b014e96d ("PCI: Protect pci_error_handlers->reset_notify() usage
with device_lock()") added protection around pci_dev_restore() function so
a device-specific remove callback does not cause a race condition with
hotplug.

pci_dev_lock() usage has been forgotten in two places.  Add locks for
pci_slot_restore() and moving pci_dev_restore() inside the locks for
pci_try_reset_function().

Signed-off-by: default avatarSinan Kaya <okaya@codeaurora.org>
Signed-off-by: default avatarBjorn Helgaas <helgaas@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 832e4e1f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment