From: Gerd Bayer <gbayer@linux.ibm.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Tariq Toukan <tariqt@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>, Shay Drori <shayd@nvidia.com>,
Mark Bloch <mbloch@nvidia.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Alex Vesker <valex@mellanox.com>,
Feras Daoud <ferasda@mellanox.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org,
Niklas Schnelle <schnelle@linux.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH net v2] net/mlx5: Avoid deadlock between PCI error recovery and health reporter
Date: Wed, 08 Oct 2025 18:46:45 +0200 [thread overview]
Message-ID: <3347624899623b430d62d94abcf870dac7354e0a.camel@linux.ibm.com> (raw)
In-Reply-To: <20251007162111.GA3604844@ziepe.ca>
On Tue, 2025-10-07 at 13:21 -0300, Jason Gunthorpe wrote:
> On Tue, Oct 07, 2025 at 04:48:26PM +0200, Gerd Bayer wrote:
> > - task: kmcheck
> > mlx5_unload_one() tries to acquire devlink lock while the PCI
> > error
> > recovery code has set pdev->block_cfg_access by way of
> > pci_cfg_access_lock()
>
> This seems wrong, arch code shouldn't invoke the driver's error
> handler while hodling pci_dev_lock().
Seeing how powerpc's EEH is also just acquiring the device_lock while
executing the PCI error recovery call-back, I'll be investigating that
route by "demoting" pci_dev_lock() to device_lock() (i.e. not including
the blockage of PCI config accesses)
Initial tests look promising, but I need to do more experimenting and
want to check the AER path in passing, too.
> Or at least if we do want to do this the locking should be documented
> and some lockdep map should be added to pci_cfg_access_lock() and the
> normal AER path..
This change of contract sounds a lot more intrusive to device drivers -
so I'm not actually pursuing this.
>
> Jason
Thanks, Gerd
prev parent reply other threads:[~2025-10-08 16:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 14:48 [PATCH net v2] net/mlx5: Avoid deadlock between PCI error recovery and health reporter Gerd Bayer
2025-10-07 16:21 ` Jason Gunthorpe
2025-10-08 16:46 ` Gerd Bayer [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=3347624899623b430d62d94abcf870dac7354e0a.camel@linux.ibm.com \
--to=gbayer@linux.ibm.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ferasda@mellanox.com \
--cc=jgg@ziepe.ca \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=schnelle@linux.ibm.com \
--cc=shayd@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=valex@mellanox.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;
as well as URLs for NNTP newsgroup(s).