[libvirt] [PATCH 3/4] snapshot: qemu: Fix segfault and vanishing snapshots when redefining
Eric Blake
eblake at redhat.com
Fri Jan 4 18:26:07 UTC 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130104/67b72f85/attachment-0001.sig>
More information about the libvir-list
mailing list