]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainRemoveChrDevice: Detach fdset after chardev hot-unplug
authorPeter Krempa <pkrempa@redhat.com>
Thu, 3 Feb 2022 09:35:03 +0000 (10:35 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 14 Feb 2022 12:14:00 +0000 (13:14 +0100)
commit22d5ce025295916462c0eb7da4daabf64f99cae0
tree4c41dcbc61c2beb3275c26fb644813ce57ab47b5
parent6d161bcc6031cf48f0c70c0a746d82b2838c33f9
qemuDomainRemoveChrDevice: Detach fdset after chardev hot-unplug

Our code uses fdsets for the pipe passed from virtlogd to qemu, but the
chardev hot-unplug code neglected to detach the fdset after the chardev
was removed. This kept the FDs open by qemu even after they were not
used any more.

After the refactor to use qemuFDPass for chardevs we now configure the
'opaque' field for fdsets used for chardevs so we can use
qemuHotplugRemoveFDSet to remove the unused fdset.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_hotplug.c
tests/qemuhotplugtest.c