Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Niklas Schnelle <schnelle@linux.ibm.com>
Cc: Lukas Wunner <lukas@wunner.de>, Keith Busch <kbusch@kernel.org>,
	Gerd Bayer <gbayer@linux.ibm.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Benjamin Block <bblock@linux.ibm.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Farhan Ali <alifm@linux.ibm.com>,
	Julian Ruess <julianr@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] PCI/IOV: Add missing PCI rescan-remove locking when enabling/disabling SR-IOV
Date: Fri, 26 Sep 2025 16:02:23 -0500	[thread overview]
Message-ID: <20250926210223.GA2267349@bhelgaas> (raw)
In-Reply-To: <20250826-pci_fix_sriov_disable-v1-0-2d0bc938f2a3@linux.ibm.com>

On Tue, Aug 26, 2025 at 10:52:07AM +0200, Niklas Schnelle wrote:
> Hi Bjorn, Hi Lukas,
> 
> This series fixes missing PCI rescan-remove locking in sriov_disable()
> and sriov_enable() the former of which was observed to cause a double
> remove / list corruption on s390. The first patch is the fix itself and
> gives more details while the second patch is an optional proposal to add
> a lockdep assertion to pci_stop_and_remove_bus_device() to catch missing
> rescan-remove locking more easily in the future. If applied without the
> first patch disabling SR-IOV via "echo 0 > /sys/bus/pci/devices/<dev>
> /sriov_numvfs" triggers the lockdep assertion. I haven't found an easy
> way to trigger the assertion in the sriov_enable() case but I checked
> callers.
> 
> Also since the sriov_add_vfs() path is not excercised on s390 due to
> pdev->no_vf_scan I did some basic testing on an x86 test system with an
> SR-IOV capable ConnectX-6 DX NIC.
> 
> Thanks,
> Niklas
> 
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> ---
> Niklas Schnelle (2):
>       PCI/IOV: Add missing PCI rescan-remove locking when enabling/disabling SR-IOV
>       PCI: Add lockdep assertion in pci_stop_and_remove_bus_device()
> 
>  drivers/pci/iov.c    | 5 +++++
>  drivers/pci/pci.h    | 2 ++
>  drivers/pci/probe.c  | 2 +-
>  drivers/pci/remove.c | 1 +
>  4 files changed, 9 insertions(+), 1 deletion(-)

Applied to pci/virtualization, hoping to squeeze into v6.18.

      parent reply	other threads:[~2025-09-26 21:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26  8:52 [PATCH 0/2] PCI/IOV: Add missing PCI rescan-remove locking when enabling/disabling SR-IOV Niklas Schnelle
2025-08-26  8:52 ` [PATCH 1/2] " Niklas Schnelle
2025-09-24 17:57   ` Farhan Ali
2025-09-25  7:48     ` Niklas Schnelle
2025-09-25 22:05       ` Farhan Ali
2025-09-26  9:24   ` Julian Ruess
2025-08-26  8:52 ` [PATCH 2/2] PCI: Add lockdep assertion in pci_stop_and_remove_bus_device() Niklas Schnelle
2025-09-12 14:48   ` Gerd Bayer
2025-09-24 18:06   ` Farhan Ali
2025-09-25  7:25     ` Niklas Schnelle
2025-09-26  9:25   ` Julian Ruess
2025-09-26 21:02 ` Bjorn Helgaas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250926210223.GA2267349@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=alifm@linux.ibm.com \
    --cc=bblock@linux.ibm.com \
    --cc=gbayer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=julianr@linux.ibm.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=schnelle@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox