]> xenbits.xensource.com Git - libvirt.git/commit
qemu_hotplug: Close FDs in QEMU on failed chardev hotplug
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 18 Jul 2022 14:29:07 +0000 (16:29 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 22 Jul 2022 13:14:44 +0000 (15:14 +0200)
commit14f42129fce26a00233a172051ed4b5c572e03b1
tree7cbe50401688f1c00c740b89e7ad8339d8f52163
parent7437f35642e30665289da3e98d1e297655c7dc31
qemu_hotplug: Close FDs in QEMU on failed chardev hotplug

When hotplugging a chardev, Libvirt opens corresponding
file/binds to a socket/does whatever necessary to obtain an FD
that is later passed to QEMU. However, if something fails after
the FDs were transferred to QEMU and before chardev is actually
added via monitor, these FDs are never closed in QEMU. This is
rather suboptimal.

Fixes: 15bdced9b3d0b86a48506bfb1c27d6b2d5377dc2
Fixes: ad81aa8ad07e52c9bd4840de84d2ed59998b4d2a
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
src/qemu/qemu_hotplug.c