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

Ilpo Järvinen
2025-09-24T13:42:43Z

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(-)

base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
--
2.39.5