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: f7091c0e1f
master date: 2025-10-27 15:52:20 +0100
This commit is contained in:
Frediano Ziglio authored and Jan Beulich committed 2025-11-10 16:00:36 +01:00
1 parent 0761895527
commit ae148e3e91
1 file changed
+1
+1
View File
@@ -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,
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.