[libvirt] [PATCH] 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. --- src/qemu/qemu_hotplug.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index f1c1283..38163ba 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; -- 1.7.8.5

On 27.03.2012 14:19, Jiri Denemark wrote:
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. --- src/qemu/qemu_hotplug.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
ACK Michal

On Tue, Mar 27, 2012 at 14:41:15 +0200, Michal Privoznik wrote:
On 27.03.2012 14:19, Jiri Denemark wrote:
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. --- src/qemu/qemu_hotplug.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
ACK
Thanks, pushed. Jirka
participants (2)
-
Jiri Denemark
-
Michal Privoznik