]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: snapshot: Prevent too-nested domain XML when doing inactive snapshot
authorPeter Krempa <pkrempa@redhat.com>
Mon, 20 Jan 2020 15:04:56 +0000 (16:04 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 27 Jan 2020 13:02:01 +0000 (14:02 +0100)
commitb168fa88b85dec181882816ab65a59a6c4500667
treea6ae75308fd49483e7664ed454034c4751b952c8
parent8e9e73a984165d5e9a82ba1f4531bb30482db5a8
qemu: snapshot: Prevent too-nested domain XML when doing inactive snapshot

Similarly to 510d154a0b41aa70aadabc0918d16dee22882394 we need to prevent
doing too deeply nested backing chains and reject them with a sane error
message.

Add a loop to go through the snapshots prior to attempting actually
creating them to prevent some possible inconsistent scenarios.

We don't need to do it when reusing backing chains as we'll be
re-detecting the backing chain in that case anyways.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_driver.c