Re: [PATCH] qemu: Double mutex unlock in qemuDomainModifyDeviceFlags

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

 



On Thu, Jan 17, 2013 at 18:25:28 +0100, Viktor Mihajlovski wrote:
> The driver mutex was unlocked in qemuDomainModifyDeviceFlags before
> entering qemuDomainObjBeginJobWithDriver where it will be unlocked once
> more leaving it in an undefined state. The result was that two
> threads were simultaneously looking up the domain hash table during
> multiple parallel device attach/detach operations.
> Luckily this triggered a virHashIterationError.
> 
> Signed-off-by: Viktor Mihajlovski <mihajlov@xxxxxxxxxxxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 8c39864..c28c223 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -6443,7 +6443,6 @@ qemuDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
>  
>      qemuDriverLock(driver);
>      vm = virDomainFindByUUID(&driver->domains, dom->uuid);
> -    qemuDriverUnlock(driver);
>      if (!vm) {
>          char uuidstr[VIR_UUID_STRING_BUFLEN];
>          virUUIDFormat(dom->uuid, uuidstr);

ACK. The function relies on driver being locked and unlocks it in
cleanup phase.

Jirka

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