libvirt/src/qemu
Daniel P. Berrange 96b893f092 Fix deadlock in QEMU close callback APIs
There is a lock ordering problem in the QEMU close callback
APIs.

When starting a guest we have a lock on the VM. We then
set a autodestroy callback, which acquires a lock on the
close callbacks.

When running auto-destroy, we obtain a lock on the close
callbacks, then run each callbacks - which obtains a lock
on the VM.

This causes deadlock if anyone tries to start a VM, while
autodestroy is taking place.

The fix is to do autodestroy in 2 phases. First obtain
all the callbacks and remove them from the list under
the close callback lock. Then invoke each callback
from outside the close callback lock.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-03-01 10:16:29 +00:00
..
libvirtd_qemu.aug qemu: conf: add seccomp_sandbox option 2012-09-18 15:43:28 +08:00
MIGRATION.txt qemu: Implement migration job phases 2011-07-27 08:45:09 -06:00
qemu_agent.c qemu: don't override earlier json error 2013-02-25 17:36:03 -07:00
qemu_agent.h Convert virDomainObj, qemuAgent, qemuMonitor, lxcMonitor to virObjectLockable 2013-01-16 11:02:58 +00:00
qemu_bridge_filter.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
qemu_bridge_filter.h Replace 'struct qemud_driver *' with virQEMUDriverPtr 2012-11-28 18:17:25 +00:00
qemu_capabilities.c qemu: Implement support for EGD backend for virtio-rng 2013-02-25 10:55:14 +01:00
qemu_capabilities.h qemu: Implement support for EGD backend for virtio-rng 2013-02-25 10:55:14 +01:00
qemu_cgroup.c Don't try to add non-existant devices to ACL 2013-02-27 22:51:24 +00:00
qemu_cgroup.h Rename all USB device functions to have a standard name prefix 2013-02-05 19:22:25 +00:00
qemu_command.c Fix a message typo 2013-02-28 15:29:10 -07:00
qemu_command.h qemu: switch PCI address alocation to use virDevicePCIAddress 2013-02-20 13:57:59 +01:00
qemu_conf.c Fix deadlock in QEMU close callback APIs 2013-03-01 10:16:29 +00:00
qemu_conf.h qemu: Avoid deadlock in autodestroy 2013-02-21 10:38:28 +01:00
qemu_domain.c qemu: Make sure qemuProcessStart is run within a job 2013-03-01 08:32:08 +01:00
qemu_domain.h qemu: Make sure qemuProcessStart is run within a job 2013-03-01 08:32:08 +01:00
qemu_driver.c qemu: Don't fail to shutdown domains with unresponsive agent 2013-02-28 12:24:34 +01:00
qemu_driver.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
qemu_hostdev.c Protect USB/PCI device list access in QEMU with dedicated locks 2013-02-05 19:22:26 +00:00
qemu_hostdev.h Rename all USB device functions to have a standard name prefix 2013-02-05 19:22:25 +00:00
qemu_hotplug.c qemu: Remove the shared disk entry if the operation is ejecting or updating 2013-02-21 00:31:24 +08:00
qemu_hotplug.h qemu: Remove the shared disk entry if the operation is ejecting or updating 2013-02-21 00:31:24 +08:00
qemu_migration.c qemu: Make sure qemuProcessStart is run within a job 2013-03-01 08:32:08 +01:00
qemu_migration.h qemu: Add support for compressed migration 2013-02-22 17:35:58 +01:00
qemu_monitor_json.c qemu: don't override earlier json error 2013-02-25 17:36:03 -07:00
qemu_monitor_json.h qemu: Introduce nbd-server-stop command 2013-02-23 08:16:42 +01:00
qemu_monitor_text.c qemu: Parse more fields from query-migrate QMP command 2013-02-22 17:35:59 +01:00
qemu_monitor_text.h qemu: Parse more fields from query-migrate QMP command 2013-02-22 17:35:59 +01:00
qemu_monitor.c qemu: minor monitor lock cleanups 2013-02-25 17:36:51 -07:00
qemu_monitor.h qemu: Introduce nbd-server-stop command 2013-02-23 08:16:42 +01:00
qemu_process.c Fix crash in QEMU auto-destroy with transient guests 2013-03-01 10:16:29 +00:00
qemu_process.h Fix typo in internal VIR_QEMU_PROCESS_START_AUTODESROY constant 2013-02-27 22:51:24 +00:00
qemu.conf doc: update description about user/group in qemu.conf 2012-10-09 08:38:36 -06:00
test_libvirtd_qemu.aug.in Fix the augea test for qemu libvirtd options 2012-09-18 16:28:43 +08:00
THREADS.txt Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00