qemu: backup: Use 'async' monitor in 'qemuBackupDiskDataCleanupOne'

'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>
This commit is contained in:
Peter Krempa 2024-09-05 14:55:59 +02:00
parent 2ccb213f94
commit 9b22c25548

View 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);
}