Re: [BUG] PCIe bridge resource allocation creates invalid limit addresses after Secondary Bus Reset recovery

Shawn Jin
2026-03-12T01:03:26Z

After enabling more debugging messages for PCI subsystem, it shows the pref bridge window was shrunken by 1 at [ 796.604883].

Again, this is the kernel 6.8. I'll test 6.19 later using openSUSE Tumbleweed. This time the realloc was on.

[ 796.604869] pcieport 0000:96:01.0: distributing available resources
[ 796.604872] pci 0000:98:00.0: bridge window [mem 0x00100000-0x001fffff] extended by 0x0000000000100000
[ 796.604876] pci 0000:99:00.0: bridge window [??? 0x00000000 flags 0x0] extended by 0x0000000000055555
[ 796.604880] pci 0000:99:01.0: bridge window [mem 0x00100000-0x001fffff] shrunken by 0x00000000000aaaac
[ 796.604883] pci 0000:99:01.0: bridge window [mem 0x800000000-0xfffffffff 64bit pref] shrunken by 0x0000000000000001
[ 796.604886] pci 0000:99:02.0: bridge window [??? 0x00000000 flags 0x0] extended by 0x0000000000055555

[ 796.607244] PCI: No. 2 try to assign unassigned res
[ 796.607246] pci 0000:99:01.0: resource 15 [mem 0x134000000000-0x1347fffffffe 64bit pref] released
[ 796.607247] pci 0000:99:01.0: PCI bridge to [bus 9b]
[ 796.607599] pcieport 0000:96:01.0: bridge window [io 0x1000-0x0fff] to [bus 98-9c] add_size 1000
[ 796.607600] pcieport 0000:96:01.0: distributing available resources
[ 796.607602] pci 0000:99:01.0: bridge window [mem 0x800000000-0xfffffffff 64bit pref] shrunken by 0x0000000000000001
[ 796.607603] pci 0000:99:02.0: bridge window [mem 0x00100000-0x001fffff] shrunken by 0x0000000000055554
[ 796.607605] pcieport 0000:96:01.0: bridge window [io size 0x1000]: can't assign; no space
[ 796.607606] pcieport 0000:96:01.0: bridge window [io size 0x1000]: failed to assign
[ 796.607607] pcieport 0000:96:01.0: bridge window [io size 0x1000]: can't assign; no space
[ 796.607607] pcieport 0000:96:01.0: bridge window [io size 0x1000]: failed to assign
[ 796.607609] pci 0000:99:01.0: bridge window [mem 0x134000000000-0x1347fffffffe 64bit pref]: assigned
[ 796.607610] pci 0000:99:00.0: bridge window [mem 0xe1b00000-0xe1bfffff]: assigned
[ 796.607611] pci 0000:99:02.0: bridge window [mem size 0x000aaaac]: can't assign; no space
[ 796.607613] pci 0000:99:02.0: bridge window [mem size 0x000aaaac]: failed to assign
[ 796.607614] pci 0000:99:00.0: PCI bridge to [bus 9a]
[ 796.607832] pci 0000:99:00.0: bridge window [mem 0xe1b00000-0xe1bfffff]
[ 796.608262] pci 0000:9b:00.0: BAR 0 [mem size 0x800000000 64bit pref]: can't assign; no space
[ 796.608264] pci 0000:9b:00.0: BAR 0 [mem size 0x800000000 64bit pref]: failed to assign
[ 796.608265] pci 0000:99:01.0: PCI bridge to [bus 9b]
[ 796.608473] pci 0000:99:01.0: bridge window [mem 0xe1a00000-0xe1a55553]
[ 796.608615] pci 0000:99:01.0: bridge window [mem 0x134000000000-0x1347fffffffe 64bit pref]

Thanks,
Shawn.
________________________________________
From: Shawn Jin <shawn.jin@asteralabs.com>
Sent: Wednesday, March 11, 2026 5:02 PM
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; linux-pci@vger.kernel.org <linux-pci@vger.kernel.org>; Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Subject: Re: [BUG] PCIe bridge resource allocation creates invalid limit addresses after Secondary Bus Reset recovery

Hi Bjorn,

Thanks for the quick response.

[+cc Ilpo]

On Wed, Mar 11, 2026 at 10:00:39PM +0000, Shawn Jin wrote:
> Hello,
>
> I'm reporting a potential critical bug in the Linux kernel's PCIe
> resource allocation code that creates invalid bridge window limit
> addresses during hotplug re-enumeration after Secondary Bus Reset
> (SBR) recovery.

Thanks for the report and the repro and debugging information!

> ## AFFECTED KERNEL VERSIONS
> - Confirmed: 5.15.0, 6.8.0 (Ubuntu 6.8.0-88-generic, 6.8.0-90-generic)
> - Likely affected: All recent kernels including 6.19

Do you know of any kernels that are *not* affected?  If you do, we
could bisect.

<SJ> I haven't tried the latest kernel 6.19 yet. I'm planning to install the openSUSE Tumbleweed with kernel 6.19.

Thanks,
Shawn.