]> git.ipfire.org Git - thirdparty/libvirt.git/commit
pci: fix pciDeviceListSteal on multiple devices
authorShradha Shah <sshah@solarflare.com>
Wed, 24 Aug 2011 15:30:51 +0000 (16:30 +0100)
committerEric Blake <eblake@redhat.com>
Wed, 24 Aug 2011 16:31:29 +0000 (10:31 -0600)
commitc0f025b8ba7ef28080432d2d89a5c60a17f559f7
treea4e2d9a73ee9cc1c3fd3ab3cab0fdb5710ed76ac
parentba0c219902a511dc287c6294db76091adc44bc7f
pci: fix pciDeviceListSteal on multiple devices

pciDeviceListSteal(pcidevs, dev) removes dev from pcidevs reducing
the length of pcidevs, so moving onto what was the next dev is wrong.

Instead callers should pop entry 0 repeatedly until pcidevs is empty.

Signed-off-by: Steve Hodgson <shodgson@solarflare.com>
Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
AUTHORS
src/qemu/qemu_hostdev.c