libvirt/daemon
Michal Privoznik a602e90bc1 daemon: Run virStateCleanup conditionally
https://bugzilla.redhat.com/show_bug.cgi?id=1033061

Currently, initialization of drivers is done in a separate thread. This
is done for several reasons: a driver that is initialized may require
running event loop, it may take ages to initialize driver (e.g. due to
autostarting domains). While the thread is spawn and run, the main()
continues its execution. However, if something goes bad, or the event
loop is just exited (e.g. due to a --timeout or SIGINT) we try to
cleanup all the drivers. So we have two threads running Initialize() and
Cleanup() concurrently. This may result in accessing stale pointers -
e.g. netcf driver will free() itself in stateCleanup callback, while the
init thread may come, open a dummy connection in order to autostart some
domains and voilà: do_open() iterates over interface drivers and
accesses stale netcf driver.

The fix consists in not running stateCleanup if the init thread is still
running.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2013-12-03 14:32:08 +01:00
..
libvirtd-config.c Introduce max_queued_clients 2013-08-05 11:03:01 +02:00
libvirtd-config.h Introduce max_queued_clients 2013-08-05 11:03:01 +02:00
libvirtd.aug Introduce max_queued_clients 2013-08-05 11:03:01 +02:00
libvirtd.c daemon: Run virStateCleanup conditionally 2013-12-03 14:32:08 +01:00
libvirtd.conf Introduce max_queued_clients 2013-08-05 11:03:01 +02:00
libvirtd.h maint: don't use config.h in .h files 2013-06-05 05:53:25 -06:00
libvirtd.init.in
libvirtd.logrotate.in
libvirtd.lxc.logrotate.in
libvirtd.pod.in Properly handle -h / -V for --help/--version aliases in virtlockd/libvirtd 2013-08-13 14:06:01 +01:00
libvirtd.policy.in daemon: Make the default PolicyKit policy auth_admin_keep. 2012-11-01 13:17:26 +00:00
libvirtd.qemu.logrotate.in
libvirtd.sasl daemon: Fix command example in libvirtd.sasl 2013-07-09 10:01:55 -04:00
libvirtd.service.in Configuring systemd to restart libvirt on failure 2013-07-31 16:55:27 -06:00
libvirtd.sysconf
libvirtd.sysctl
libvirtd.uml.logrotate.in
libvirtd.upstart
Makefile.am Don't link virt-login-shell against libvirt.so (CVE-2013-4400) 2013-10-21 14:03:52 +01:00
remote.c daemon: don't free domain if it's null 2013-10-18 07:41:34 +02:00
remote.h Implement the RPC protocol for the libvirt-lxc.la library 2013-01-15 18:16:53 +00:00
stream.c Fix max stream packet size for old clients 2013-09-30 19:01:23 +01:00
stream.h
test_libvirtd.aug.in build: fix missing max_queued_clients in augeas test file for libvirtd.conf 2013-08-05 15:09:52 -04:00
THREADS.txt docs: fix usage of 'onto' 2013-04-19 14:31:16 -06:00