From: Viktor Mihajlovski Date: Thu, 17 Jan 2013 17:25:28 +0000 (+0100) Subject: qemu: Double mutex unlock in qemuDomainModifyDeviceFlags X-Git-Tag: v1.0.2-rc1~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56fd513;p=thirdparty%2Flibvirt.git qemu: Double mutex unlock in qemuDomainModifyDeviceFlags 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 --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8c39864cc6..c28c2236b7 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);