]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Pass correct qemuCaps to virDomainDefPostParse
authorJiri Denemark <jdenemar@redhat.com>
Tue, 6 Aug 2019 11:53:11 +0000 (13:53 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 9 Aug 2019 11:55:54 +0000 (13:55 +0200)
commitc90fb5a828a68512095d80c190c0f491e385438e
treeb88a3d7f80284e0e8bfb1d732644d678885c5591
parentbbcfa07bea4fbe2fe8a51f99f20c77ddefd2d40d
qemu: Pass correct qemuCaps to virDomainDefPostParse

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.

This patch fixes all paths leading to virDomainDefPostParse.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_driver.c
src/qemu/qemu_process.c