PCI: hv: Lock PCI bus on device eject
A PCI_EJECT message can arrive at the same time we are calling pci_scan_child_bus() in the workqueue for the previous PCI_BUS_RELATIONS message or in create_root_hv_pci_bus(). In this case we could potentially modify the bus from multiple places. Properly lock the bus access. Thanks Dexuan Cui <decui@microsoft.com> for pointing out the race condition in create_root_hv_pci_bus(). Reported-by: NXiaofeng Wang <xiaofwan@redhat.com> Signed-off-by: NLong Li <longli@microsoft.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NK. Y. Srinivasan <kys@microsoft.com>
Showing
想要评论请 注册 或 登录