[PATCH v2 0/5] Fix crash when reverting/deleting external snapshots

Peter Krempa via Devel posted 5 patches 6 days, 12 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1769443445.git.pkrempa@redhat.com
src/conf/snapshot_conf.c |  4 +--
src/qemu/qemu_domain.c   |  2 --
src/qemu/qemu_domain.h   |  1 +
src/qemu/qemu_snapshot.c | 61 ++++++++++++++++++++++++++++------------
4 files changed, 46 insertions(+), 22 deletions(-)
[PATCH v2 0/5] Fix crash when reverting/deleting external snapshots
Posted by Peter Krempa via Devel 6 days, 12 hours ago
v2:
 - modified explanation of why virStorageSourceIsSameLocation was called
   with NULL
 - fixed the call to virStorageSourceGetMetadata which caused the NULL
   deref
 - fixed permission issue when calling qemu-img if files are owned by
   root:root after restoring seclabels
 - improved error message when generating snapshot path fails (not
   related to original bug, just annoying when I've had a messed up VM)

Peter Krempa (5):
  qemuSnapshotDiskHasBackingDisk: Avoid call of
    virStorageSourceIsSameLocation with NULL argument
  qemuSnapshotUpdateBackingStore: Remove stale comment
  qemuSnapshotDiskHasBackingDisk: Use proper 'max_depth' when calling
    'virStorageSourceGetMetadata'
  virDomainSnapshotDefAssignExternalNames: Improve error message
  qemuSnapshotUpdateBackingStore: Retry as curent user if qemu-img fails

 src/conf/snapshot_conf.c |  4 +--
 src/qemu/qemu_domain.c   |  2 --
 src/qemu/qemu_domain.h   |  1 +
 src/qemu/qemu_snapshot.c | 61 ++++++++++++++++++++++++++++------------
 4 files changed, 46 insertions(+), 22 deletions(-)

-- 
2.52.0
Re: [PATCH v2 0/5] Fix crash when reverting/deleting external snapshots
Posted by Pavel Hrdina via Devel 5 days, 20 hours ago
On Mon, Jan 26, 2026 at 05:06:48PM +0100, Peter Krempa via Devel wrote:
> v2:
>  - modified explanation of why virStorageSourceIsSameLocation was called
>    with NULL
>  - fixed the call to virStorageSourceGetMetadata which caused the NULL
>    deref
>  - fixed permission issue when calling qemu-img if files are owned by
>    root:root after restoring seclabels
>  - improved error message when generating snapshot path fails (not
>    related to original bug, just annoying when I've had a messed up VM)
> 
> Peter Krempa (5):
>   qemuSnapshotDiskHasBackingDisk: Avoid call of
>     virStorageSourceIsSameLocation with NULL argument
>   qemuSnapshotUpdateBackingStore: Remove stale comment
>   qemuSnapshotDiskHasBackingDisk: Use proper 'max_depth' when calling
>     'virStorageSourceGetMetadata'
>   virDomainSnapshotDefAssignExternalNames: Improve error message
>   qemuSnapshotUpdateBackingStore: Retry as curent user if qemu-img fails

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>