Re: [PATCH] qemu: backup: Use 'async' monitor in 'qemuBackupDiskDataCleanupOne'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 05, 2024 at 14:58:45 +0200, Peter Krempa wrote:
> '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.
> 
> Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>

Fixes: https://gitlab.com/libvirt/libvirt/-/issues/668

> ---
>  src/qemu/qemu_backup.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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);
>          }

Reviewed-by: Jiri Denemark <jdenemar@xxxxxxxxxx>



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux