Re: [PATCH 3/4] snapshot: qemu: Fix segfault and vanishing snapshots when redefining

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

 



On 01/03/2013 06:38 AM, Peter Krempa wrote:
> When the disk alignment check done while redefining an existing snapshot
> failed, the qemu driver attempted to free the existing snapshot. As in
> the cleanup path the definition of the snapshot wasn't assigned, the
> cleanup code dereferenced a NULL pointer.
> 
> This patch changes the behavior on error paths while redefining snapshot
> in two ways:
> 
> 1) On failure, modifications done on the snapshot definiton object are

s/definiton/definition/

> rolled back.
> 
> 2) The previous definition of the data isn't freed until it's certain it
> won't be needed any more.
> 
> This change avoids the segfault and additionaly the snapshot doesn't

s/additionaly/additionally/

> vanish if re-definiton fails for some reason.

s/re-definiton/redefinition/

> ---
>  src/qemu/qemu_driver.c | 51 +++++++++++++++++++++++++++++++++++---------------
>  1 file changed, 36 insertions(+), 15 deletions(-)
> 

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]