]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Pass correct qemuCaps to virDomainDefCopy
authorJiri Denemark <jdenemar@redhat.com>
Tue, 6 Aug 2019 11:41:42 +0000 (13:41 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 9 Aug 2019 11:55:54 +0000 (13:55 +0200)
commitbbcfa07bea4fbe2fe8a51f99f20c77ddefd2d40d
tree7f7e0b2f34b6ac376f47819a64ea76983f495b21
parentbf15b145ec473c0ca5bfe8aee2bf0eb1691b6f1c
qemu: Pass correct qemuCaps to virDomainDefCopy

Since qemuDomainDefPostParse callback requires qemuCaps, we need to make
sure it gets the capabilities stored in the domain's private data if the
domain is running. Passing NULL may cause QEMU capabilities probing to
be triggered in case QEMU binary changed in the meantime. When this
happens while a running domain object is locked, QMP event delivered to
the domain before QEMU capabilities probing finishes will deadlock the
event loop.

Several general functions from domain_conf.c were lazily passing NULL as
the parseOpaque pointer instead of letting their callers pass the right
data. This patch fixes all paths leading to virDomainDefCopy to do the
right thing.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
12 files changed:
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libxl/libxl_domain.c
src/libxl/libxl_driver.c
src/libxl/libxl_migration.c
src/lxc/lxc_driver.c
src/lxc/lxc_process.c
src/qemu/qemu_driver.c
src/qemu/qemu_migration.c
src/qemu/qemu_process.c
src/test/test_driver.c
tests/qemuhotplugtest.c