diff options
author | Long Li <longli@microsoft.com> | 2021-05-12 01:06:40 -0700 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2021-06-03 18:28:48 +0100 |
commit | 94d22763207ac6633612b8d8e0ca4fba0f7aa139 (patch) | |
tree | f93d65deb83f01b40dcc20f6b5e10ed43a2887cc /include/linux/elfcore-compat.h | |
parent | 6efb943b8616ec53a5e444193dccf1af9ad627b5 (diff) |
PCI: hv: Fix a race condition when removing the device
On removing the device, any work item (hv_pci_devices_present() or
hv_pci_eject_device()) scheduled on workqueue hbus->wq may still be running
and race with hv_pci_remove().
This can happen because the host may send PCI_EJECT or PCI_BUS_RELATIONS(2)
and decide to rescind the channel immediately after that.
Fix this by flushing/destroying the workqueue of hbus before doing hbus remove.
Link: https://lore.kernel.org/r/1620806800-30983-1-git-send-email-longli@linuxonhyperv.com
Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Diffstat (limited to 'include/linux/elfcore-compat.h')
0 files changed, 0 insertions, 0 deletions