Re: [PATCH v14 0/2] PCI/IOV: Fix SR-IOV locking races and AB-BA deadlock
From: Benjamin Block
Date: Thu May 21 2026 - 11:50:23 EST
Hey Bjorn,
On Wed, Apr 22, 2026 at 09:32:40AM +0300, Ionut Nechita (Wind River) wrote:
> From: Ionut Nechita <ionut.nechita@xxxxxxxxxxxxx>
>
> This is v14 of the fix for the SR-IOV race between driver .remove()
> and concurrent hotplug events.
>
--8<--
>
> This race has been independently observed by multiple organizations:
> - IBM (s390 platform-generated hot-unplug events racing with
> sriov_del_vfs during PF driver unload)
> - NVIDIA (tested by Dragos Tatulea in earlier versions)
> - Intel (xe driver hitting lockdep warnings and deadlocks when
> calling pci_disable_sriov from .remove)
> - Wind River (original reporter and patch author)
>
> Test environment:
> - Tested on s390 by Benjamin Block and Niklas Schnelle (IBM)
> - Tested on x86_64 with Intel and NVIDIA SR-IOV devices (earlier
> versions)
>
> Based on linux-next (next-20260420).
>
--8<--
>
> Ionut Nechita (Wind River) (2):
> PCI/IOV: Make pci_lock_rescan_remove() reentrant and protect
> sriov_add_vfs/sriov_del_vfs
> PCI: Fix AB-BA deadlock between device_lock and pci_rescan_remove_lock
> in remove_store
>
> drivers/pci/iov.c | 9 +++++----
> drivers/pci/pci-sysfs.c | 30 +++++++++++++++++++++++++++++-
> drivers/pci/probe.c | 18 ++++++++++++++++--
> 3 files changed, 50 insertions(+), 7 deletions(-)
do you think this patchset is ready integration? Or what do you think we'd
still need to do to get there?
This race, and especially those I fix in the follow-on patchset
https://lore.kernel.org/linux-pci/cover.1776868550.git.bblock%40linux.ibm.com/
are pretty painful on s390 with PCI hotplug. It forces us to reboot the
system, since there is no other way to get out of the deadlock.
--
Best Regards, Benjamin Block / Linux on IBM Z Kernel Development
IBM Deutschland Research & Development GmbH / https://www.ibm.com/privacy
Vors. Aufs.-R.: Wolfgang Wendt / Geschäftsführung: David Faller
Sitz der Ges.: Ehningen / Registergericht: AmtsG Stuttgart, HRB 243294