Re: [PATCH 2/3] libxl_driver: Resolve Coverity errors

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

 



On 03/05/2013 05:43 AM, John Ferlan wrote:
> 1. The virObjectLock() call was unconditional, but Unlock was conditional
>    on vm being valid.  Removed the check
> 
> 2. A call to virDomainEventNewFromObj() isn't guaranteed to return an
>    event - that check needs to be made prior to libxlDomainEventQueue()
>    of the event. Did not add libxlDriverLock/Unlock around the call since
>    some callers already have lock taken

Someday, we should remove the big libxl lock in the same way that danpb
just removed the big qemu lock; but that's an independent project.

> 
> 3. Need to initialize fd = -1 in libxlDoDomainSave() since we can jump
>    to cleanup before it's set.
> 
> 4. Missing break;'s in libxlDomainModifyDeviceFlags() for case
>    LIBXL_DEVICE_UPDATE.  The default: case would report an error

More precisely, the device update fell through to the default case and
reported an error even if it had succeeded.

At any rate, all of these fixes look correct.
ACK.

-- 
Eric Blake   eblake redhat com    +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]