Skip to content

pci-hyperv: Fix race condition bugs for fast device hotplug

Dexuan Cui linux-hyperv linux-pci linux-rdma lkml netdev stable 4 versions – Applied

Status from this message: Applied to hyperv-fixes. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 1 replyApplied
  2. v36 patches 18 repliesSuperseded
  3. v26 patches 9 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches14 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/5PCI: hv: Fix a race condition bug in hv_pci_query_relations()drivers/pci/controller/pci-hyperv.c+18 -00 replies
2/5PCI: hv: Fix a race condition in hv_irq_unmask() that can cause panicdrivers/pci/controller/pci-hyperv.c+5 -60 replies
3/5PCI: hv: Remove the useless hv_pcichild_state from struct hv_pci_devdrivers/pci/controller/pci-hyperv.c+0 -120 replies
4/5Revert "PCI: hv: Fix a timing issue which causes kdump to fail occasionally"drivers/pci/controller/pci-hyperv.c+34 -370 replies
5/5PCI: hv: Add a per-bus mutex state_lockdrivers/pci/controller/pci-hyperv.c+26 -30 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchMichael KelleyLorenzo PieralisiWei Hu
1/5R-b A-b
2/5R-b
3/5R-b A-b
4/5R-b A-b
5/5R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/5] pci-hyperv: Fix race condition bugs for fast device hotplug

Before the guest finishes probing a device, the host may be already starting to remove the device. Currently there are multiple race condition bugs in the pci-hyperv driver, which can cause the guest to panic. The patchset fixes the crashes.

The patchset also does some cleanup work: patch 3 removes the useless hv_pcichild_state, and patch 4 reverts an old patch which is not really useful (without patch 4, it would be hard to make patch 5 clean).

Patch 6 in v3 is dropped for now since it's a feature rather than a fix. Patch 6 will be split into two patches as suggested by Lorenzo and will be posted after the 5 patches are accepted first.

The v4 addressed Lorenzo's comments and added Lorenzo' Acks to patch 1, 3 and 5.

The v4 is based on v6.4-rc6, and can apply cleanly to the Hyper-V tree's hyperv-fixes branch.

The patchset is also availsble in my github branch:
https://github.com/dcui/tdx/commits/decui/vpci/v6.4-rc6-vpci-v4

FYI, v3 can be found here:
https://lwn.net/ml/linux-kernel/[email protected]/

Please review. Thanks!

Dexuan Cui (5):
PCI: hv: Fix a race condition bug in hv_pci_query_relations()
PCI: hv: Fix a race condition in hv_irq_unmask() that can cause panic
PCI: hv: Remove the useless hv_pcichild_state from struct hv_pci_dev Revert "PCI: hv: Fix a timing issue which causes kdump to fail
occasionally"
PCI: hv: Add a per-bus mutex state_lock

 drivers/pci/controller/pci-hyperv.c | 139 ++++++++++++++++------------
 1 file changed, 82 insertions(+), 57 deletions(-)
Signature · 1 line
2.25.1