mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xen/pci: prevent infinite loop for faulty SR-IOV cards
If a SR-IOV card presents an I/O space inside a BAR the code will continue to loop on the same card. This is due to the missing increment of the cycle variable. Fixes:a1a6d59862("pci: split code to size BARs from pci_add_device") Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> master commit:f7091c0e1fmaster date: 2025-10-27 15:52:20 +0100
This commit is contained in:
1 parent
0761895527
commit
ae148e3e91
1 file changed
+1
@@ -752,6 +752,7 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn,
|
||||
printk(XENLOG_WARNING
|
||||
"SR-IOV device %pp with vf BAR%u in IO space\n",
|
||||
&pdev->sbdf, i);
|
||||
++i;
|
||||
continue;
|
||||
}
|
||||
ret = pci_size_mem_bar(pdev->sbdf, idx, NULL,
|
||||
|
||||