qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 9a3e52: monitor: guard iothread access by mon


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 9a3e52: monitor: guard iothread access by mon->use_io_thre...
Date: Tue, 06 Nov 2018 10:25:19 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 9a3e52e3465f85d203d0fd2910ca3625b3c45420
      
https://github.com/qemu/qemu/commit/9a3e52e3465f85d203d0fd2910ca3625b3c45420
  Author: Wolfgang Bumiller <address@hidden>
  Date:   2018-11-06 (Tue, 06 Nov 2018)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: guard iothread access by mon->use_io_thread

monitor_resume() and monitor_suspend() both want to
"kick" the I/O thread if it is there, but in
monitor_suspend() lacked the use_io_thread flag condition.
This is required when we later only spawn the thread on
first use.

Signed-off-by: Wolfgang Bumiller <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 8511770185f5769d06e7c3e37b2fd79f268cf84c
      
https://github.com/qemu/qemu/commit/8511770185f5769d06e7c3e37b2fd79f268cf84c
  Author: Wolfgang Bumiller <address@hidden>
  Date:   2018-11-06 (Tue, 06 Nov 2018)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: delay monitor iothread creation

Commit d32749deb615 moved the call to monitor_init_globals()
to before os_daemonize(), making it an unsuitable place to
spawn the monitor iothread as it won't be inherited over the
fork() in os_daemonize().

We now spawn the thread the first time we instantiate a
monitor which actually has use_io_thread == true.
Instantiation of monitors happens only after os_daemonize().
We still need to create the qmp_dispatcher_bh when not using
iothreads, so this now still happens in
monitor_init_globals().

Signed-off-by: Wolfgang Bumiller <address@hidden>
Fixes: d32749deb615 ("monitor: move init global earlier")
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Tested-by: Peter Xu <address@hidden>
[This fixes a crash on shutdown with --daemonize]
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 0c57893d62596d1d91779452be3b38b4b72ecd04
      
https://github.com/qemu/qemu/commit/0c57893d62596d1d91779452be3b38b4b72ecd04
  Author: Eric Blake <address@hidden>
  Date:   2018-11-06 (Tue, 06 Nov 2018)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Avoid crash when -mon is underspecified

A quick coredump on an incomplete command line:
./x86_64-softmmu/qemu-system-x86_64 -mon mode=control,pretty=on

 #0  0x00007ffff723d9e4 in g_str_hash () at /lib64/libglib-2.0.so.0
 #1  0x00007ffff723ce38 in g_hash_table_lookup () at /lib64/libglib-2.0.so.0
 #2  0x0000555555cc0073 in object_class_property_find (klass=0x5555566a94b0, 
name=0x0, errp=0x0) at qom/object.c:1135
 #3  0x0000555555cc004b in object_class_property_find (klass=0x5555566a9440, 
name=0x0, errp=0x0) at qom/object.c:1129
 #4  0x0000555555cbfe6e in object_property_find (obj=0x5555568348c0, name=0x0, 
errp=0x0) at qom/object.c:1080
 #5  0x0000555555cc183d in object_resolve_path_component 
(parent=0x5555568348c0, part=0x0) at qom/object.c:1762
 #6  0x0000555555d82071 in qemu_chr_find (name=0x0) at chardev/char.c:802
 #7  0x00005555559d77cb in mon_init_func (opaque=0x0, opts=0x5555566b65a0, 
errp=0x0) at vl.c:2291

Fix it to instead fail gracefully.

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 9012b5ca7605e90f686017059d2e007bc934efad
      
https://github.com/qemu/qemu/commit/9012b5ca7605e90f686017059d2e007bc934efad
  Author: Peter Maydell <address@hidden>
  Date:   2018-11-06 (Tue, 06 Nov 2018)

  Changed paths:
    M monitor.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2018-10-30-v2' 
into staging

Monitor patches for 2018-10-30

# gpg: Signature made Tue 06 Nov 2018 17:37:16 GMT
# gpg:                using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-monitor-2018-10-30-v2:
  vl: Avoid crash when -mon is underspecified
  monitor: delay monitor iothread creation
  monitor: guard iothread access by mon->use_io_thread

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/0ca70f19c010...9012b5ca7605
      **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]