From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Niklas Schnelle <schnelle@linux.ibm.com>
Cc: "Ionut Nechita (Wind River)" <ionut.nechita@windriver.com>,
Benjamin Block <bblock@linux.ibm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, Clark Williams <clrkwllms@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
Ionut Nechita <ionut_n2001@yahoo.com>,
Farhan Ali <alifm@linux.ibm.com>,
Julian Ruess <julianr@linux.ibm.com>
Subject: Re: [PATCH] PCI/IOV: Fix recursive locking deadlock on pci_rescan_remove_lock
Date: Wed, 11 Feb 2026 08:37:32 +0100 [thread overview]
Message-ID: <20260211073732.DN2yupeZ@linutronix.de> (raw)
In-Reply-To: <2b6a844619892ecaa11031705808667e0886d8b2.camel@linux.ibm.com>
On 2026-02-09 11:12:36 [+0100], Niklas Schnelle wrote:
> Agree, this looks related to the deadlock I later found with that
> commit and that lead to this revert+new fix that has now been queued
> for the v6.20/v7.00 here:
>
> https://lore.kernel.org/linux-pci/20251216-revert_sriov_lock-v3-0-dac4925a7621@linux.ibm.com/
So this particular problem is solved then.
> That said I do find this approach interesting. Benjamin and I are
> actually still looking into a related problem with not taking the
> rescan/remove lock as part of vfio-pci tear down and there this
> approach could work better than just moving the locking up into the
> sysfs handler. So far we haven't found a good place to take the lock in
> that path that doesn't suffer from the recursive locking in other
> paths. On the other hand conditionally taking a mutex is always a
> little ugly in my opinion.
If you could split the calling chain and have one side "I need the lock"
and the other one "I don't need the lock" that would be nicer than this.
> Thanks,
> Niklas
Sebastian
next prev parent reply other threads:[~2026-02-11 7:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 7:57 [PATCH] PCI/IOV: Fix recursive locking deadlock on pci_rescan_remove_lock Ionut Nechita (Wind River)
2026-02-09 8:25 ` Sebastian Andrzej Siewior
2026-02-09 10:12 ` Niklas Schnelle
2026-02-11 7:37 ` Sebastian Andrzej Siewior [this message]
2026-02-09 16:14 ` Bjorn Helgaas
2026-02-22 11:29 ` Ionut Nechita (Wind River)
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=20260211073732.DN2yupeZ@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=alifm@linux.ibm.com \
--cc=bblock@linux.ibm.com \
--cc=bhelgaas@google.com \
--cc=clrkwllms@kernel.org \
--cc=ionut.nechita@windriver.com \
--cc=ionut_n2001@yahoo.com \
--cc=julianr@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=rostedt@goodmis.org \
--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