From: Lukas Wunner <lukas@wunner.de>
To: Paul Cercueil <paul.cercueil@bootlin.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-pci@vger.kernel.org, stable@vger.kernel.org,
Qiang Yu <qiang.yu@oss.qualcomm.com>
Subject: Re: [PATCH] PCI: Fix root port reset lock ordering
Date: Mon, 30 Nov 2026 18:16:03 +0100 [thread overview]
Message-ID: <aw2vU-x6k2jNCtrs@wunner.de> (raw)
In-Reply-To: <20261130153218.189926-1-paul.cercueil@bootlin.com>
[cc += Qiang]
On Mon, Nov 30, 2026 at 04:32:18PM +0100, Paul Cercueil wrote:
> Currently, pci_host_reset_root_port() calls pci_lock_rescan_remove(),
> to protect pci_bus_error_reset().
>
> The reset function then calls pci_reset_bridge(), then pci_slot_reset(),
> pci_reset_hotplug_slot(), which will call the .reset_slot callback.
> For a pciehp root port, this calls the pciehp_reset_slot() function,
> which will grab the 'reset_lock'.
>
> On the other hand, the pciehp IRQ handler pciehp_ist() gets the
> 'reset_lock' first, then calls pciehp_handle_presence_or_link_change(),
> which will call pciehp_enable_slot(), __pciehp_enable_slot(),
> board_added(), then finally pciehp_configure_device(), which will call
> pci_lock_rescan_remove().
>
> Address this ABBA locking issue by temporarily releasing the
> 'reset_lock' in pciehp_{un}configure_device, just to grab the rescan
> lock before locking the 'reset_lock' once again.
Duplicate of:
https://lore.kernel.org/r/20261126-fix_deadlock_1126-v2-1-c0ed50bc7b04@oss.qualcomm.com/
Please see the discussion there.
prev parent reply other threads:[~2026-11-30 17:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 15:32 [PATCH] PCI: Fix root port reset lock ordering Paul Cercueil
[not found] ` <sashiko-outbox-241514@kernel.org>
2026-11-30 16:10 ` Paul Cercueil
2026-11-30 17:16 ` Lukas Wunner [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=aw2vU-x6k2jNCtrs@wunner.de \
--to=lukas@wunner.de \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=paul.cercueil@bootlin.com \
--cc=qiang.yu@oss.qualcomm.com \
--cc=stable@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.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