|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/vpci: fix off-by-one in pci_sanitize_bar_memory()
commit 7ab4b392b78b5ac1c7a1fb1d085637526e67521a
Author: Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Thu May 22 15:38:34 2025 +0200
Commit: Roger Pau Monne <roger.pau@xxxxxxxxxx>
CommitDate: Thu May 22 16:17:12 2025 +0200
x86/vpci: fix off-by-one in pci_sanitize_bar_memory()
rangeset_remove_range() uses inclusive ranges, and hence the end of the
range should be calculated using PFN_DOWN(), not PFN_UP().
Fixes: 4acab25a9300 ('x86/vpci: fix handling of BAR overlaps with non-hole
regions')
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index afaf9fe1c0..26bb7f6a3c 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -131,7 +131,7 @@ int pci_sanitize_bar_memory(struct rangeset *r)
continue;
rc = rangeset_remove_range(r, PFN_DOWN(entry->addr),
- PFN_UP(entry->addr + entry->size - 1));
+ PFN_DOWN(entry->addr + entry->size - 1));
if ( rc )
return rc;
}
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |