From: Peter Krempa Date: Thu, 5 Sep 2024 12:55:59 +0000 (+0200) Subject: qemu: backup: Use 'async' monitor in 'qemuBackupDiskDataCleanupOne' X-Git-Tag: v10.8.0-rc1~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b22c25548aa658acdeac2269ddae32584df32d8;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Jiri Denemark --- diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index 81391c29f7..5eb2cbe306 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -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); }