Re: [PATCH v2] qemu: ensure vhostuser FD is initialized to -1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
   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@xxxxxxxxxx>
---

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@xxxxxxxxxx>

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux