From: Lukas Wunner <lukas@wunner.de>
To: Ian May <ian.may@canonical.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/2] PCIe hotplug interrupt and AER deadlock with reset_lock and device_lock
Date: Fri, 17 Jul 2020 07:20:00 +0200 [thread overview]
Message-ID: <20200717052000.vsyvbnwbhni4iy6y@wunner.de> (raw)
In-Reply-To: <0598848d-47ab-f436-04ea-7ef1f348905b@canonical.com>
On Tue, Jun 16, 2020 at 12:13:23PM -0500, Ian May wrote:
> Thanks for the quick reply! I like your solution and have confirmed it
> solves the first deadlock we see between the Hotplug interrupt and AER
> recovery.
Thank you for the confirmation (and sorry for the delay). I'm cooking
up a proper patch right now.
One question regarding your patch [2/2]: If, instead of this patch,
you change pci_bus_error_reset() to call "device_lock(bridge)" rather
than "mutex_lock(&pci_slot_mutex)", do you still see deadlocks?
Taking the pci_slot_mutex in pci_bus_error_reset() was actually the
right thing to do because it holds the driver of the hotplug port
in place. (The hotplug port above the bus being reset.) Without
that, dereferencing slot->hotplug in pci_slot_reset() wouldn't be
safe. My fear is that acquiring the device_lock() of the bridge
leading to the bus being reset may cause other deadlocks, in particular
in cascaded topologies such as Thunderbolt, which I suspect may be
what you're dealing with.
Thanks,
Lukas
next prev parent reply other threads:[~2020-07-17 5:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 14:32 [PATCH 0/2] Hotplug interrupt and AER recovery deadlocks Ian May
2020-06-15 14:32 ` [PATCH 1/2] PCIe hotplug interrupt and AER deadlock with reset_lock and device_lock Ian May
2020-06-15 18:56 ` Lukas Wunner
2020-06-16 17:13 ` Ian May
2020-07-17 5:20 ` Lukas Wunner [this message]
[not found] ` <CAE1ug=a8PJpKh0Jx2ZZxo5kwQvvK883xs+mzyMWbW8T1oqyKDg@mail.gmail.com>
2020-08-01 16:14 ` Lukas Wunner
2020-07-14 23:58 ` Bjorn Helgaas
2020-06-15 14:32 ` [PATCH 2/2] PCIe hotplug interrupt and AER pci_slot_mutex deadlock Ian May
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=20200717052000.vsyvbnwbhni4iy6y@wunner.de \
--to=lukas@wunner.de \
--cc=ian.may@canonical.com \
--cc=linux-pci@vger.kernel.org \
/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).