Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Keith Busch <kbusch@meta.com>, <linux-pci@vger.kernel.org>
Cc: <bhelgaas@google.com>, <kwilczynski@kernel.org>,
	Keith Busch <kbusch@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCHv2] PCI: fix recursive device locking
Date: Thu, 11 Jul 2024 13:05:59 -0700	[thread overview]
Message-ID: <66903b27b9840_102cc294ec@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20240711193650.701834-1-kbusch@meta.com>

Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
> 
> If one of the bus' devices has subordinates, the recursive call locks
> itself, so no need to lock the device before the recursion or it will
> surely deadlock.
> 
> Fixes: dbc5b5c0d268f87 ("PCI: Add missing bridge lock to pci_bus_lock()"
> Cc: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
> Changes from v1:
> 
>  Fixed the same recursive locking for pci_bus_trylock(),
>  pci_slot_lock(), and pci_slot_trylock()

Oh, yes, good find, I should have spotted that earlier.

>  drivers/pci/pci.c | 33 ++++++++++++++++++---------------
>  1 file changed, 18 insertions(+), 15 deletions(-)

Reviewed-by: Dan Williams <dan.j.williams@intel.com>

  reply	other threads:[~2024-07-11 20:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11 19:36 [PATCHv2] PCI: fix recursive device locking Keith Busch
2024-07-11 20:05 ` Dan Williams [this message]
2024-07-11 20:50 ` 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=66903b27b9840_102cc294ec@dwillia2-xfh.jf.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=bhelgaas@google.com \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=kwilczynski@kernel.org \
    --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