]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Pass qemuCaps to qemuDomainDefCopy
authorJiri Denemark <jdenemar@redhat.com>
Fri, 2 Aug 2019 15:36:56 +0000 (17:36 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 9 Aug 2019 11:55:54 +0000 (13:55 +0200)
commita42f889591c16235e0fe349e509af896fa1ea5ff
treede9dfa8bf02add947515b47e797a14abc0747346
parent0dc84c347a57e828f836643bf8efcc3fea37d38e
qemu: Pass qemuCaps to qemuDomainDefCopy

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 qemuDomainDefCopy.

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