Skip to content
Snippets Groups Projects
  1. Jan 13, 2021
  2. Jan 12, 2021
  3. Oct 29, 2020
  4. Oct 27, 2020
  5. Oct 12, 2020
  6. Sep 18, 2020
  7. Sep 16, 2020
  8. Aug 21, 2020
  9. Jun 10, 2020
  10. Apr 29, 2020
    • Markus Armbruster's avatar
      io: Fix qio_channel_socket_close() error handling · fdceb4ab
      Markus Armbruster authored
      
      The Error ** argument must be NULL, &error_abort, &error_fatal, or a
      pointer to a variable containing NULL.  Passing an argument of the
      latter kind twice without clearing it in between is wrong: if the
      first call sets an error, it no longer points to NULL for the second
      call.
      
      qio_channel_socket_close() passes @errp first to
      socket_listen_cleanup(), and then, if closesocket() fails, to
      error_setg_errno().  If socket_listen_cleanup() failed, this will trip
      the assertion in error_setv().
      
      Fix by ignoring a second error.
      
      Fixes: 73564c40
      Cc: Daniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Message-Id: <20200422130719.28225-11-armbru@redhat.com>
      fdceb4ab
  11. Feb 07, 2020
  12. Sep 03, 2019
  13. Aug 21, 2019
  14. Jun 12, 2019
    • Markus Armbruster's avatar
      Include qemu-common.h exactly where needed · a8d25326
      Markus Armbruster authored
      
      No header includes qemu-common.h after this commit, as prescribed by
      qemu-common.h's file comment.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190523143508.25387-5-armbru@redhat.com>
      [Rebased with conflicts resolved automatically, except for
      include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c
      block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c
      target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h
      target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h
      target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h
      target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and
      net/tap-bsd.c fixed up]
      a8d25326
    • Markus Armbruster's avatar
      Include qemu/module.h where needed, drop it from qemu-common.h · 0b8fa32f
      Markus Armbruster authored
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190523143508.25387-4-armbru@redhat.com>
      [Rebased with conflicts resolved automatically, except for
      hw/usb/dev-hub.c hw/misc/exynos4210_rng.c hw/misc/bcm2835_rng.c
      hw/misc/aspeed_scu.c hw/display/virtio-vga.c hw/arm/stm32f205_soc.c;
      ui/cocoa.m fixed up]
      0b8fa32f
  15. Mar 22, 2019
  16. Mar 20, 2019
  17. Feb 25, 2019
  18. Feb 12, 2019
  19. Jan 24, 2019
    • Daniel P. Berrangé's avatar
      io: ensure UNIX client doesn't unlink server socket · 73564c40
      Daniel P. Berrangé authored
      
      The qio_channel_socket_close method for was mistakenly unlinking the
      UNIX server socket, even if the channel was a client connection. This
      was not noticed with chardevs, since they never call close, but with the
      VNC server, this caused the VNC server socket to be deleted after the
      first client quit.
      
      The qio_channel_socket_close method also needlessly reimplemented the
      logic that already exists in socket_listen_cleanup(). Just call that
      method directly, for listen sockets only.
      
      This fixes a regression introduced in QEMU 3.0.0 with
      
        commit d66f78e1
        Author: Pavel Balaev <mail@void.so>
        Date:   Mon May 21 19:17:35 2018 +0300
      
          Delete AF_UNIX socket after close
      
      Fixes launchpad #1795100
      
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      73564c40
  20. Nov 19, 2018
    • Daniel P. Berrangé's avatar
      io: return 0 for EOF in TLS session read after shutdown · a2458b6f
      Daniel P. Berrangé authored
      
      GNUTLS takes a paranoid approach when seeing 0 bytes returned by the
      underlying OS read() function. It will consider this an error and
      return GNUTLS_E_PREMATURE_TERMINATION instead of propagating the 0
      return value. It expects apps to arrange for clean termination at
      the protocol level and not rely on seeing EOF from a read call to
      detect shutdown. This is to harden apps against a malicious 3rd party
      causing termination of the sockets layer.
      
      This is unhelpful for the QEMU NBD code which does have a clean
      protocol level shutdown, but still relies on seeing 0 from the I/O
      channel read in the coroutine handling incoming replies.
      
      The upshot is that when using a plain NBD connection shutdown is
      silent, but when using TLS, the client spams the console with
      
        Cannot read from TLS channel: Broken pipe
      
      The NBD connection has, however, called qio_channel_shutdown()
      at this point to indicate that it is done with I/O. This gives
      the opportunity to optimize the code such that when the channel
      has been shutdown in the read direction, the error code
      GNUTLS_E_PREMATURE_TERMINATION gets turned into a '0' return
      instead of an error.
      
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Message-Id: <20181119134228.11031-1-berrange@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      a2458b6f
  21. Nov 01, 2018
    • Marc-André Lureau's avatar
      websock: fix handshake leak · ad824bdc
      Marc-André Lureau authored
      
      Missed in f69a8bde.
      Thanks Valgrind:
      
      ==955== 217 bytes in 1 blocks are definitely lost in loss record 275 of 321
      ==955==    at 0x483A965: realloc (vg_replace_malloc.c:785)
      ==955==    by 0x50B6839: __vasprintf_chk (in /usr/lib64/libc-2.28.so)
      ==955==    by 0x49AA05C: g_vasprintf (in /usr/lib64/libglib-2.0.so.0.5800.1)
      ==955==    by 0x4983440: g_strdup_vprintf (in /usr/lib64/libglib-2.0.so.0.5800.1)
      ==955==    by 0x126048: qio_channel_websock_handshake_send_res (channel-websock.c:162)
      ==955==    by 0x1266E6: qio_channel_websock_handshake_send_res_ok (channel-websock.c:362)
      ==955==    by 0x126D3E: qio_channel_websock_handshake_process (channel-websock.c:468)
      ==955==    by 0x126EF2: qio_channel_websock_handshake_read (channel-websock.c:511)
      ==955==    by 0x12715B: qio_channel_websock_handshake_io (channel-websock.c:571)
      ==955==    by 0x125027: qio_channel_fd_source_dispatch (channel-watch.c:84)
      ==955==    by 0x496326C: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.5800.1)
      ==955==    by 0x169EC3: glib_pollfds_poll (main-loop.c:215)
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      ad824bdc
  22. Jun 28, 2018
  23. May 20, 2018
  24. Mar 27, 2018
  25. Mar 13, 2018
  26. Mar 06, 2018
  27. Mar 02, 2018
Loading