From: Jiri Denemark Date: Tue, 27 Mar 2012 11:32:43 +0000 (+0200) Subject: qemu: Avoid entering monitor with locked driver X-Git-Tag: v0.9.11-rc2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2067e31bf97667eab9f111b496f5e9a44e827c5b;p=thirdparty%2Flibvirt.git qemu: Avoid entering monitor with locked driver This avoids possible deadlock of the qemu driver in case a domain is begin migrated (in Begin phase) and unrelated connection to qemu driver is closed at the right time. I checked all callers of qemuDomainCheckEjectableMedia() and they are calling this function with qemu driver locked. --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index f1c1283c75..38163badb8 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -160,9 +160,9 @@ qemuDomainCheckEjectableMedia(struct qemud_driver *driver, int ret = -1; int i; - qemuDomainObjEnterMonitor(driver, vm); + qemuDomainObjEnterMonitorWithDriver(driver, vm); table = qemuMonitorGetBlockInfo(priv->mon); - qemuDomainObjExitMonitor(driver, vm); + qemuDomainObjExitMonitorWithDriver(driver, vm); if (!table) goto cleanup;