]> git.proxmox.com Git - mirror_qemu.git/commitdiff
monitor: Fix crashes when using HMP commands without CPU
authorThomas Huth <thuth@redhat.com>
Fri, 13 Jan 2017 12:12:35 +0000 (13:12 +0100)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Tue, 21 Feb 2017 18:29:01 +0000 (18:29 +0000)
When running certain HMP commands ("info registers", "info cpustats",
"info tlb", "nmi", "memsave" or dumping virtual memory) with the "none"
machine, QEMU crashes with a segmentation fault. This happens because the
"none" machine does not have any CPUs by default, but these HMP commands
did not check for a valid CPU pointer yet. Add such checks now, so we get
an error message about the missing CPU instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1484309555-1935-1-git-send-email-thuth@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

No differences found