diff options
author | Long Li <longli@microsoft.com> | 2021-05-12 10:06:40 +0200 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2021-06-03 19:28:48 +0200 |
commit | 94d22763207ac6633612b8d8e0ca4fba0f7aa139 (patch) | |
tree | f93d65deb83f01b40dcc20f6b5e10ed43a2887cc /scripts/spdxcheck.py | |
parent | Linux 5.13-rc1 (diff) | |
download | linux-94d22763207ac6633612b8d8e0ca4fba0f7aa139.tar.xz linux-94d22763207ac6633612b8d8e0ca4fba0f7aa139.zip |
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 'scripts/spdxcheck.py')
0 files changed, 0 insertions, 0 deletions