Re: [PATCH] qemu: fix potential dead lock

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

 



On 05/25/2012 12:12 PM, Wen Congyang wrote:
> If we lock the qemu_driver, we should call qemuDomainObjBeginJobWithDriver()
> not qemuDomainObjBeginJob().
> 
> ---
>  src/qemu/qemu_driver.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 39b27b1..3d62aab 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -8905,7 +8905,7 @@ qemuDomainMigrateBegin3(virDomainPtr domain,
>              goto cleanup;
>          asyncJob = QEMU_ASYNC_JOB_MIGRATION_OUT;
>      } else {
> -        if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
> +        if (qemuDomainObjBeginJobWithDriver(driver, vm, QEMU_JOB_MODIFY) < 0)
>              goto cleanup;
>          asyncJob = QEMU_ASYNC_JOB_NONE;
>      }

ACK, cite:
"... qemud_driver must NOT be locked ..." for qemuDomainObjBeginJob()
and
"If qemud_driver is passed, it MUST be locked ..." for
qemuDomainObjBeginJobWithDriver() and the driver is being locked about
15 lines before that.

Martin

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[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]