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

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

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


> 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


> vanish if re-definiton fails for some reason.


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


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

Attachment: signature.asc
Description: OpenPGP digital signature

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