mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-08 22:39:56 +00:00
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.
This commit is contained in:
parent
6e73850b01
commit
1020a5041b
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user