Re: [PATCH] pci: don't fallback to bus reset after failed slot reset

Bjorn Helgaas
2026-04-27T22:28:53Z

On Fri, Apr 24, 2026 at 04:09:29PM -0600, Keith Busch wrote:
> On Fri, Apr 24, 2026 at 11:11:36AM -0500, Bjorn Helgaas wrote:
> > On Tue, Apr 21, 2026 at 08:06:44AM -0700, Keith Busch wrote:
> > > From: Keith Busch <kbusch@kernel.org>
> > >
> > > If a bus has hotplug slots that implement the slot's reset_slot
> > > callback, it is not safe to do the non-slot specific bus reset, so don't
> > > fallback to it. If a slot reset does fail, the subsequent bus reset will
> > > attempt a 2nd link reset on top of previous and fail to handle the
> > > hotplug events.
> > >
> > > Fixes: 8238cb69c01fe ("PCI: Make reset_subordinate hotplug safe")
> > > Signed-off-by: Keith Busch <kbusch@kernel.org>
> >
> > Applied to pci/reset for v7.2, thanks! Will be rebased after
> > v7.1-rc1.
>
> I kind of think this is 7.1 material. If a pciehp slot reset fails
> because of some hardware issue, that means the device is being removed
> after disabling the hotplug "ignore". Falling back to a bus reset walks
> the bus' device list without a lock, so it risks grabbing an invalid
> pointer racing with the removal.

Thanks for the heads-up; I moved this to pci/for-linus for v7.1.