RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-14 Thread Long Li
> -Original Message- > From: Dexuan Cui > Sent: Tuesday, September 13, 2016 10:45 PM > To: Long Li ; KY Srinivasan ; > Haiyang Zhang ; Bjorn Helgaas > > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; linux- > p...@vger.kernel.org > Subject:

RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-13 Thread Dexuan Cui
> From: Long Li > Sent: Wednesday, September 14, 2016 1:41 > > I think this code is safe here. If we reach the code > pci_stop_and_remove_bus_device_locked, create_root_hv_pci_bus() is already > called. When hv_pci_probe() -> create_root_hv_pci_bus() -> pci_scan_child_bus() is running on one cpu

RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-13 Thread Long Li
erproject.org; linux-ker...@vger.kernel.org; linux- > p...@vger.kernel.org > Subject: RE: [PATCH 2/2] pci-hyperv: properly handle device eject > > This sender failed our fraud detection checks and may not be who they > appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing >

RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-13 Thread Long Li
> -Original Message- > From: Dexuan Cui > Sent: Tuesday, September 13, 2016 2:51 AM > To: Long Li ; KY Srinivasan ; > Haiyang Zhang ; Bjorn Helgaas > > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; linux- > p...@vger.kernel.org > Subject:

RE: [PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-13 Thread Dexuan Cui
> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of Long Li > Sent: Tuesday, September 13, 2016 7:54 > ... > 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, in this ca

[PATCH 2/2] pci-hyperv: properly handle device eject

2016-09-12 Thread Long Li
From: Long Li 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, in this case we could potentailly modify the bus from two places. Properly lock the bus access. Signed-off-by: Long Li --- drivers/pci