]> git.ipfire.org Git - thirdparty/libvirt.git/commit
lib: Grab write lock when modifying list of domains
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 6 Sep 2019 11:59:59 +0000 (13:59 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 7 Sep 2019 06:22:30 +0000 (08:22 +0200)
commitd301bc8d08084272cde2e210e6b257b05d005d02
tree722a74ba898a8ec5efd09cd16739070854656e09
parent56f024f457b16219d512810ab1861c6c4482b516
lib: Grab write lock when modifying list of domains

In some places where virDomainObjListForEach() is called the
passed callback calls virDomainObjListRemoveLocked(). Well, this
is unsafe, because the former only grabs a read lock but the
latter modifies the list.
I've identified the following unsafe calls:

- qemuProcessReconnectAll()
- libxlReconnectDomains()

The rest seem to be safe.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/bhyve/bhyve_driver.c
src/bhyve/bhyve_process.c
src/conf/virdomainobjlist.c
src/conf/virdomainobjlist.h
src/libxl/libxl_driver.c
src/lxc/lxc_process.c
src/qemu/qemu_driver.c
src/qemu/qemu_process.c
src/vmware/vmware_driver.c