public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Keith Busch <kbusch@kernel.org>
Cc: Keith Busch <kbusch@meta.com>,
	linux-pci@vger.kernel.org,  bhelgaas@google.com,
	alex@shazbot.org, Lukas Wunner <lukas@wunner.de>,
	 helgaas@kernel.org
Subject: Re: [PATCH 1/2] pci: fix slot trylock error handling
Date: Wed, 28 Jan 2026 11:16:06 +0200 (EET)	[thread overview]
Message-ID: <0637bc5b-afe5-80f0-8d80-7e6d1e2eea15@linux.intel.com> (raw)
In-Reply-To: <aXji6yYImTyT26Wm@kbusch-mbp>

On Tue, 27 Jan 2026, Keith Busch wrote:

> On Fri, Jan 16, 2026 at 10:41:49AM -0800, Keith Busch wrote:
> > From: Keith Busch <kbusch@kernel.org>
> > 
> > The device lock isn't held if pci_bus_trylock() fails, so the code had
> > been attempting to improperly unlock it.
> > 
> > Fixes: a4e772898f8bf2 ("PCI: Add missing bridge lock to pci_bus_lock()")
> > Signed-off-by: Keith Busch <kbusch@kernel.org>
> 
> Ping?

There's the older patch from Jinhui for the same thing:

https://patchwork.kernel.org/project/linux-pci/patch/20251212145528.2555-1-guojinhui.liam@bytedance.com/

> > ---
> >  drivers/pci/pci.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> > index 72d88ea95f3cc..3378221c5723a 100644
> > --- a/drivers/pci/pci.c
> > +++ b/drivers/pci/pci.c
> > @@ -5494,10 +5494,8 @@ static int pci_slot_trylock(struct pci_slot *slot)
> >  		if (!dev->slot || dev->slot != slot)
> >  			continue;
> >  		if (dev->subordinate) {
> > -			if (!pci_bus_trylock(dev->subordinate)) {
> > -				pci_dev_unlock(dev);
> > +			if (!pci_bus_trylock(dev->subordinate))
> >  				goto unlock;
> > -			}
> >  		} else if (!pci_dev_trylock(dev))
> >  			goto unlock;
> >  	}
> > -- 
> > 2.47.3
> > 
> 

-- 
 i.


  reply	other threads:[~2026-01-28  9:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16 18:41 [PATCH 1/2] pci: fix slot trylock error handling Keith Busch
2026-01-16 18:41 ` [PATCH 2/2] pci: fix slot reset device locking Keith Busch
2026-01-28 18:03   ` Bjorn Helgaas
2026-01-28 19:13     ` Keith Busch
2026-01-28 22:53       ` Bjorn Helgaas
2026-01-29 15:59         ` Keith Busch
2026-01-28 19:54     ` Ilpo Järvinen
2026-01-28 21:07       ` dan.j.williams
2026-01-28 21:11         ` Bjorn Helgaas
2026-01-28 21:00   ` dan.j.williams
2026-01-27 16:09 ` [PATCH 1/2] pci: fix slot trylock error handling Keith Busch
2026-01-28  9:16   ` Ilpo Järvinen [this message]
2026-01-28 15:11     ` Keith Busch
2026-01-28 15:14       ` Ilpo Järvinen
2026-01-27 23:20 ` Bjorn Helgaas
2026-01-28 20:47 ` dan.j.williams

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=0637bc5b-afe5-80f0-8d80-7e6d1e2eea15@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=alex@shazbot.org \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    /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