Re: [PATCH] qemu: Rollback on used USB devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/16/2012 08:53 AM, Michal Privoznik wrote:
> One of our latest USB device handling patches
> 05abd1507d66aabb6cad12eeafeb4c4d1911c585 introduced a regression.
> That is, we first create a temporary list of all USB devices that
> are to be used by domain just starting up. Then we iterate over and
> check if a device from the list is in the global list of currently
> assigned devices (activeUsbHostdevs). If not, we add it there and
> continue with next iteration then. But if a device from temporary
> list is either taken already or adding to the activeUsbHostdevs fails,
> we remove all devices in temp list from the activeUsbHostdevs list.
> Therefore, if a device is already taken we remove it from
> activeUsbHostdevs even if we should not. Thus, next time we allow
> the device to be assigned to another domain.

My bad for not reviewing the original patch in context in the first
place, or I might have questioned the loop consolidation.

> ---
>  src/qemu/qemu_hostdev.c |   28 ++++++++++++----------------
>  1 files changed, 12 insertions(+), 16 deletions(-)

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]