[PATCH 2/3] PCI: Fix start of available space for the next bridge during distribution
From: Ilpo Järvinen
Date: Mon Nov 09 2026 - 09:47:35 EST
After distributing space to a bridge,
pci_bus_distribute_available_resources() advances available[i].start with
"+= end + 1". As .start and .end are addresses, not a base and a size,
this adds start a second time. The space left for the following bridges
then starts at a bogus address, which skews their alignment calculations.
Set start to just past the space given to the previous bridge.
Fixes: 08f0a15ee8ad ("PCI: Align extra resources for hotplug bridges properly")
Reported-by: Claude:claude-opus-5-5 <noreply@xxxxxxxxxxxxx>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
---
drivers/pci/setup-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index bd0974def921..9d8b22d1e6ad 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -2077,7 +2077,7 @@ static void pci_bus_distribute_available_resources(struct pci_bus *bus,
pci_bus_distribute_available_resources(b, add_list, available);
for (i = 0; i < PCI_P2P_BRIDGE_RESOURCE_NUM; i++)
- available[i].start += available[i].end + 1;
+ available[i].start = available[i].end + 1;
}
}
--
2.47.3