qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 554a39: hmp: Replace error_report_err


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 554a39: hmp: Replace error_report_err
Date: Tue, 31 Oct 2017 06:11:29 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 554a39eb3268ef927ccd19ea642b886f0acf8ec2
      
https://github.com/qemu/qemu/commit/554a39eb3268ef927ccd19ea642b886f0acf8ec2
  Author: ZhiPeng Lu <address@hidden>
  Date:   2017-10-30 (Mon, 30 Oct 2017)

  Changed paths:
    M hmp.c

  Log Message:
  -----------
  hmp: Replace error_report_err

Use hmp_handle_error instend of error_report_err to set error.

Signed-off-by: ZhiPeng Lu <address@hidden>
Reviewed-by: Jiyun Fan <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 751f8cfe2a556b3ef49f6af2860e2d1d2a1ec66a
      
https://github.com/qemu/qemu/commit/751f8cfe2a556b3ef49f6af2860e2d1d2a1ec66a
  Author: Greg Kurz <address@hidden>
  Date:   2017-10-30 (Mon, 30 Oct 2017)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: fix dangling CPU pointer

If a CPU selected with the "cpu" command is hot-unplugged then "info cpus"
causes QEMU to exit:

(qemu) device_del cpu1
(qemu) info cpus
qemu:qemu_cpu_kick_thread: No such process

This happens because "cpu" stores the pointer to the selected CPU into
the monitor structure. When the CPU is hot-unplugged, we end up with a
dangling pointer. The "info cpus" command then does:

hmp_info_cpus()
 monitor_get_cpu_index()
  mon_get_cpu()
   cpu_synchronize_state() <--- called with dangling pointer

This could cause a QEMU crash as well.

This patch switches the monitor to store the QOM path instead of a
pointer to the current CPU. The path is then resolved when needed.
If the resolution fails, we assume that the CPU was removed and the
path is resetted to the default (ie, path of first_cpu).

Reported-by: Satheesh Rajendran <address@hidden>
Suggested-by: Igor Mammedov <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: d2b9d71432687eef947f243a57409381151701d5
      
https://github.com/qemu/qemu/commit/d2b9d71432687eef947f243a57409381151701d5
  Author: Peter Maydell <address@hidden>
  Date:   2017-10-31 (Tue, 31 Oct 2017)

  Changed paths:
    M hmp.c
    M monitor.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20171030' into 
staging

hmp pull 2017-10-30

# gpg: Signature made Mon 30 Oct 2017 20:17:57 GMT
# gpg:                using RSA key 0x0516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <address@hidden>"
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-hmp-20171030:
  monitor: fix dangling CPU pointer
  hmp: Replace error_report_err

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


Compare: https://github.com/qemu/qemu/compare/abf6e752e55b...d2b9d7143268

reply via email to

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