Skip to content
Snippets Groups Projects
  1. Nov 03, 2020
  2. Oct 09, 2020
  3. Sep 16, 2020
    • Yonggang Luo's avatar
      tests: fix test-util-sockets.c · 8330bd53
      Yonggang Luo authored
      
      Fixes following errors:
      Running test test-util-sockets
      ERROR test-util-sockets - missing test plan
      
      # Start of name tests
      **
      ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: assertion failed (fd != -1): (-1 != -1)
      Bail out! ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: assertion failed (fd != -1): (-1 != -1)
      
      First should call to qemu_init_main_loop before socket_init,
      then on win32 doesn't support for SOCKET_ADDRESS_TYPE_FD socket type
      
      Signed-off-by: default avatarYonggang Luo <luoyonggang@gmail.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Message-Id: <20200915121318.247-21-luoyonggang@gmail.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      8330bd53
  4. Aug 25, 2020
  5. Aug 05, 2020
  6. May 20, 2020
  7. Mar 06, 2020
    • Kevin Wolf's avatar
      hmp: Fail gracefully if chardev is already in use · 8e9119a8
      Kevin Wolf authored
      
      Trying to attach a HMP monitor to a chardev that is already in use
      results in a crash because monitor_init_hmp() passes &error_abort to
      qemu_chr_fe_init():
      
      $ ./x86_64-softmmu/qemu-system-x86_64 --chardev stdio,id=foo --mon foo --mon foo
      QEMU 4.2.50 monitor - type 'help' for more information
      (qemu) Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:220:
      qemu-system-x86_64: --mon foo: Device 'foo' is in use
      Abgebrochen (Speicherabzug geschrieben)
      
      Fix this by allowing monitor_init_hmp() to return an error and passing
      any error in qemu_chr_fe_init() to its caller instead of aborting.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20200224143008.13362-19-kwolf@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      8e9119a8
    • Kevin Wolf's avatar
      qmp: Fail gracefully if chardev is already in use · f27a9bb3
      Kevin Wolf authored
      
      Trying to attach a QMP monitor to a chardev that is already in use
      results in a crash because monitor_init_qmp() passes &error_abort to
      qemu_chr_fe_init():
      
      $ ./x86_64-softmmu/qemu-system-x86_64 --chardev stdio,id=foo --mon foo,mode=control --mon foo,mode=control
      Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:220:
      qemu-system-x86_64: --mon foo,mode=control: Device 'foo' is in use
      Abgebrochen (Speicherabzug geschrieben)
      
      Fix this by allowing monitor_init_qmp() to return an error and passing
      any error in qemu_chr_fe_init() to its caller instead of aborting.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20200224143008.13362-18-kwolf@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      f27a9bb3
  8. Sep 03, 2019
  9. Aug 22, 2019
  10. Jun 18, 2019
  11. Apr 18, 2019
  12. Jul 23, 2018
    • Peter Xu's avatar
      monitor: Fix unsafe sharing of @cur_mon among threads · 62aa1d88
      Peter Xu authored
      
      @cur_mon is null unless the main thread is running monitor code, either
      HMP code within monitor_read(), or QMP code within
      monitor_qmp_dispatch().
      
      Use of @cur_mon outside the main thread is therefore unsafe.
      
      Most of its uses are in monitor command handlers.  These run in the main
      thread.
      
      However, there are also uses hiding elsewhere, such as in
      error_vprintf(), and thus error_report(), making these functions unsafe
      outside the main thread.  No such unsafe uses are known at this time.
      Regardless, this is an unnecessary trap.  It's an ancient trap, though.
      
      More recently, commit cf869d53 "qmp: support out-of-band (oob)
      execution" spiced things up: the monitor I/O thread assigns to @cur_mon
      when executing commands out-of-band.  Having two threads save, set and
      restore @cur_mon without synchronization is definitely unsafe.  We can
      end up with @cur_mon null while the main thread runs monitor code, or
      non-null while it runs non-monitor code.
      
      We could fix this by making the I/O thread not mess with @cur_mon, but
      that would leave the trap armed and ready.
      
      Instead, make @cur_mon thread-local.  It's now reliably null unless the
      thread is running monitor code.
      
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      [peterx: update subject and commit message written by Markus]
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Message-Id: <20180720033451.32710-1-peterx@redhat.com>
      62aa1d88
  13. Mar 13, 2018
Loading