From: Lukas Wunner <lukas@wunner.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Keith Busch <keith.busch@intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Frederick Lawler <fred@fredlawl.com>,
"Gustavo A . R . Silva" <gustavo@embeddedor.com>,
Sinan Kaya <okaya@kernel.org>,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] PCI: pciehp: Prevent deadlock on disconnect
Date: Wed, 13 Nov 2019 07:35:19 +0100 [thread overview]
Message-ID: <20191113063519.ivv2ehejxonkfufe@wunner.de> (raw)
In-Reply-To: <20191113031752.GA227753@google.com>
On Tue, Nov 12, 2019 at 09:17:52PM -0600, Bjorn Helgaas wrote:
> On Tue, Oct 29, 2019 at 08:00:22PM +0300, Mika Westerberg wrote:
> > parent PCIe downstream port, who got the hot-remove event, starts
> > removing devices below it taking pci_lock_rescan_remove() lock. When the
> > child PCIe port is runtime resumed it calls pciehp_check_presence()
> > which ends up calling pciehp_card_present() and pciehp_check_link_active().
>
> Oh, I see, pciehp_resume() calls pciehp_check_presence(), which
> schedules the IRQ thread via pciehp_request(). So does this deadlock
> only happen if the port(s) have been runtime suspended?
No, there is a multitude of situations when the deadlock may occur and
this is just one of them. See my comment on v1 of this patch:
https://patchwork.ozlabs.org/patch/1117870/#2230798
Thanks,
Lukas
next prev parent reply other threads:[~2019-11-13 6:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-29 17:00 [PATCH v3 1/2] PCI: pciehp: Do not disable interrupt twice on suspend Mika Westerberg
2019-10-29 17:00 ` [PATCH v3 2/2] PCI: pciehp: Prevent deadlock on disconnect Mika Westerberg
2019-11-13 3:17 ` Bjorn Helgaas
2019-11-13 6:35 ` Lukas Wunner [this message]
2019-11-13 11:15 ` Mika Westerberg
2019-11-12 9:32 ` [PATCH v3 1/2] PCI: pciehp: Do not disable interrupt twice on suspend Mika Westerberg
2019-11-13 23:06 ` Bjorn Helgaas
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=20191113063519.ivv2ehejxonkfufe@wunner.de \
--to=lukas@wunner.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=fred@fredlawl.com \
--cc=gustavo@embeddedor.com \
--cc=helgaas@kernel.org \
--cc=kai.heng.feng@canonical.com \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=okaya@kernel.org \
--cc=rjw@rjwysocki.net \
/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).