]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Pass correct qemuCaps to virDomainDefParseNode
authorJiri Denemark <jdenemar@redhat.com>
Tue, 6 Aug 2019 12:19:35 +0000 (14:19 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 9 Aug 2019 11:55:54 +0000 (13:55 +0200)
commit577a1f98fc84e4152c246695942502ef9a45c7f7
tree20b0f22132d5d5a197d5b262230a477d11eaefc8
parentc90fb5a828a68512095d80c190c0f491e385438e
qemu: Pass correct qemuCaps to virDomainDefParseNode

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 snapshot and checkpoint APIs were lazily passing NULL as
the parseOpaque pointer instead of letting their callers pass the right
data. This patch fixes all paths leading to virDomainDefParseNode.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/checkpoint_conf.c
src/conf/checkpoint_conf.h
src/conf/snapshot_conf.c
src/conf/snapshot_conf.h
src/esx/esx_driver.c
src/qemu/qemu_driver.c
src/test/test_driver.c
src/vbox/vbox_common.c
tests/qemudomaincheckpointxml2xmltest.c
tests/qemudomainsnapshotxml2xmltest.c