[libvirt] [PATCH v2] qemu: ensure vhostuser FD is initialized to -1
Michal Privoznik
mprivozn at redhat.com
Mon Sep 30 11:48:55 UTC 2019
On 9/30/19 1:39 PM, Daniel P. Berrangé wrote:
> The video private data was not initializing the vhostuser FD
> causing us to attempt to close FD 0 many times over.
>
> Fixes
>
> commit ca60ecfa8cc1bd85baf7137dd1864d5f00f019f0
> Author: Marc-André Lureau <marcandre.lureau at redhat.com>
> Date: Mon Sep 23 14:44:36 2019 +0400
>
> qemu: add qemuDomainVideoPrivate
>
> Since the test suite does not invoke qemuExtDevicesStart(), no
> vhost_user_fd will be present when generating test XML. To deal
> with this we can must a fake FD number. While the current XML
> is using FD == 0, we pick a very interesting number that's unlikely
> to be a real FD, so that we're more likely to see any mistakes
> closing the invalid FD.
>
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
>
> In v2:
>
> - Fix FD initialization in test suite
>
> src/qemu/qemu_domain.c | 2 ++
> .../vhost-user-gpu-secondary.x86_64-latest.args | 4 ++--
> .../qemuxml2argvdata/vhost-user-vga.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/virtio-options.args | 2 +-
> tests/qemuxml2argvtest.c | 10 ++++++++++
> 5 files changed, 16 insertions(+), 4 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn at redhat.com>
Michal
More information about the libvir-list
mailing list