]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: backup: Use 'async' monitor in 'qemuBackupDiskDataCleanupOne'
authorPeter Krempa <pkrempa@redhat.com>
Thu, 5 Sep 2024 12:55:59 +0000 (14:55 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 5 Sep 2024 13:52:26 +0000 (15:52 +0200)
'qemuBackupDiskDataCleanupOne()' is entering the monitor while we're in
the async backup job inside 'qemuBackupBegin()' which is semantically
wrong and per upstream report causes crashes if some monitoring commands
are run in parallel.

Use qemuDomainObjEnterMonitorAsync() instead.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/668
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_backup.c

index 81391c29f7b5c564aac905c3283273a025b24c7a..5eb2cbe306278522f99c4800fd056f7af91cfdd7 100644 (file)
@@ -125,7 +125,8 @@ qemuBackupDiskDataCleanupOne(virDomainObj *vm,
 
     if (!dd->started) {
         if (dd->added) {
-            qemuDomainObjEnterMonitor(vm);
+            if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_BACKUP) < 0)
+                return;
             qemuBlockStorageSourceAttachRollback(priv->mon, dd->crdata->srcdata[0]);
             qemuDomainObjExitMonitor(vm);
         }