summaryrefslogtreecommitdiff
path: root/tools/perf/lib/include/internal/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-01-21 15:14:17 +0200
committerBjorn Helgaas <bhelgaas@google.com>2026-01-22 10:29:55 -0600
commit5528fd38f230c906fcebb202cc94fbb8ed8f122a (patch)
treec1b278e82a77d1eb7a17b0521ac7ac5a2049f76e /tools/perf/lib/include/internal/git@git.tavy.me:linux.git
parent08d9eae76b85263173f8c833800e3cc409ee1be4 (diff)
PCI: Fix Resizable BAR restore order
The commit 337b1b566db0 ("PCI: Fix restoring BARs on BAR resize rollback path") changed BAR resize to layer rebar code and resource setup/restore code cleanly. Unfortunately, it did not consider how the value of the BAR Size field impacts the read-only bits in the Base Address Register (PCIe7 spec, sec. 7.8.6.3). That is, it very much matters in which order the BAR Size and Base Address Register are restored. Post-337b1b566db0 ("PCI: Fix restoring BARs on BAR resize rollback path") during BAR resize rollback, pci_do_resource_release_and_resize() attempts to restore the old address to the BAR that was resized, but it can fail to setup the address correctly if the address has low bits set that collide with the bits that are still read-only. As a result, kernel's resource and BAR will be out-of-sync. Fix this by restoring BAR Size before rolling back the resource changes and restoring the BAR. Fixes: 337b1b566db0 ("PCI: Fix restoring BARs on BAR resize rollback path") Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://lore.kernel.org/linux-pci/aW_w1oFQCzUxGYtu@intel.com/ Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260121131417.9582-3-ilpo.jarvinen@linux.intel.com
Diffstat (limited to 'tools/perf/lib/include/internal/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions