Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1482017
| From | Long Li <longli@exchange.microsoft.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] pci-hyperv: properly handle device eject |
| Date | 2016-09-13 00:10 +0200 |
| Message-ID | <sgHAl-172-17@gated-at.bofh.it> (permalink) |
| References | <sgHAl-172-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Long Li <longli@microsoft.com>
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 <longli@microsoft.com>
---
drivers/pci/host/pci-hyperv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
index 3c2b330..ca77009 100644
--- a/drivers/pci/host/pci-hyperv.c
+++ b/drivers/pci/host/pci-hyperv.c
@@ -1587,7 +1587,7 @@ static void hv_eject_device_work(struct work_struct *work)
pdev = pci_get_domain_bus_and_slot(hpdev->hbus->sysdata.domain, 0,
wslot);
if (pdev) {
- pci_stop_and_remove_bus_device(pdev);
+ pci_stop_and_remove_bus_device_locked(pdev);
pci_dev_put(pdev);
}
--
1.8.5.6
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 2/2] pci-hyperv: properly handle device eject Long Li <longli@exchange.microsoft.com> - 2016-09-13 00:10 +0200
RE: [PATCH 2/2] pci-hyperv: properly handle device eject Dexuan Cui <decui@microsoft.com> - 2016-09-13 12:30 +0200
RE: [PATCH 2/2] pci-hyperv: properly handle device eject Long Li <longli@microsoft.com> - 2016-09-13 19:50 +0200
RE: [PATCH 2/2] pci-hyperv: properly handle device eject Long Li <longli@microsoft.com> - 2016-09-13 20:20 +0200
RE: [PATCH 2/2] pci-hyperv: properly handle device eject Dexuan Cui <decui@microsoft.com> - 2016-09-14 08:10 +0200
RE: [PATCH 2/2] pci-hyperv: properly handle device eject Long Li <longli@microsoft.com> - 2016-09-14 18:50 +0200
csiph-web