Re: [PATCH 0/2] PCI: Fix bogus resource overlaps

Bjorn Helgaas
2025-09-24T23:48:07Z

On Wed, Sep 24, 2025 at 04:42:26PM +0300, Ilpo Järvinen wrote:
> Hi all,
>
> I noticed a few bogus resource overlaps in logs which occurred for PNP
> resource addresses that collided with large zero-based resources
> (typically IOV resources). It turns out, the problem boils down to not
> marking resources properly with IORESOURCE_UNSET when BAR is read into
> the struct resource.
>
> I've long wanted to mark resource not within their window with
> IORESOURCE_UNSET as done in patch 2, however, my first attempt to do it
> failed because the bridge window resources were not yet available. I
> assumed the bridge window change would require more extensive changes
> and postponed it, but it turns there were no big complications from it
> (at least so far).
>
> But things may be more complicated than I know so if you think there's
> a good reason why the filling of bridge resources is delayed to the
> second read, please speak up!
>
> There are extra notes in both patches under --- line, please check
> them as well.
>
> This series does not removed the second read of the bridge resources,
> it's probably unnecessary work now but confirming that requires more
> testing and code reading than I currently have time for so just sending
> the obvious fix series out (and adding a TODO entry for myself for
> later).
>
> Ilpo Järvinen (2):
> PCI: Setup bridge resources earlier
> PCI: Resources outside their window must set IORESOURCE_UNSET
>
> drivers/pci/probe.c | 45 ++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 42 insertions(+), 3 deletions(-)

Applied to pci/resource for v6.18, thanks!