mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +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>
Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@gmail.com>
This commit is contained in:
1 parent
8ef32772b5
commit
f7091c0e1f
1 file changed
+1
@@ -746,6 +746,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,
|
||||
|
||||