diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2012-09-14 10:53:00 +0200 |
---|---|---|
committer | Michal Privoznik <mprivozn@redhat.com> | 2012-09-18 09:24:06 +0200 |
commit | 1020a5041b0eb575f65b53cb1ca9cee2447a50cd (patch) | |
tree | 95a43b4861c4045b1adee1c4c63514dfa7d491aa | |
parent | qemu: Use disk wwn in qemu command line (diff) | |
download | libvirt-1020a5041b0eb575f65b53cb1ca9cee2447a50cd.tar.gz libvirt-1020a5041b0eb575f65b53cb1ca9cee2447a50cd.tar.bz2 libvirt-1020a5041b0eb575f65b53cb1ca9cee2447a50cd.zip |
qemu: Avoid deadlock on HandleAgentEOF
On agent EOF the qemuProcessHandleAgentEOF() callback is called
which locks virDomainObjPtr. Then qemuAgentClose() is called
(with domain object locked) which eventually calls qemuAgentDispose()
and qemuProcessHandleAgentDestroy(). This tries to lock the
domain object again. Hence the deadlock.
-rw-r--r-- | src/qemu/qemu_process.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index abbe1f9ce..5095381b7 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -116,7 +116,7 @@ extern struct qemud_driver *qemu_driver; * performed */ static void -qemuProcessHandleAgentEOF(qemuAgentPtr agent ATTRIBUTE_UNUSED, +qemuProcessHandleAgentEOF(qemuAgentPtr agent, virDomainObjPtr vm) { struct qemud_driver *driver = qemu_driver; @@ -128,12 +128,12 @@ qemuProcessHandleAgentEOF(qemuAgentPtr agent ATTRIBUTE_UNUSED, virDomainObjLock(vm); priv = vm->privateData; - - qemuAgentClose(agent); priv->agent = NULL; virDomainObjUnlock(vm); qemuDriverUnlock(driver); + + qemuAgentClose(agent); } |