Re: [PATCHv3 04/43] snapshot: don't leak resources on qemu snapshot failure

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

 



On Wed, Aug 24, 2011 at 09:22:21AM -0600, Eric Blake wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=727709
> mentions that if qemu fails to create the snapshot (such as what
> happens on Fedora 15 qemu, which has qmp but where savevm is only
> in hmp, and where libvirt is old enough to not try the hmp fallback),
> then 'virsh snapshot-list dom' will show a garbage snapshot entry,
> and the libvirt internal directory for storing snapshot metadata
> will have a bogus file.
> 
> This fixes the fallout bug of polluting the snapshot-list with
> garbage on failure (the root cause of the F15 bug of not having
> fallback to hmp has already been fixed in newer libvirt releases).
> 
> * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML): Allocate
> memory before making snapshot, and cleanup on failure.  Don't
> dereference NULL if transient domain exited during snapshot creation.
> ---
>  src/qemu/qemu_driver.c |   43 ++++++++++++++++++++++++-------------------
>  1 files changed, 24 insertions(+), 19 deletions(-)

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]