Skip to content

fix segfaults caused by accessing CPU in empty machine

Ziyue Yang qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2monitor.c: make mon_get_cpu return NULL when there is no CPUmonitor.c+7 -33 replies
2/2target/i386/monitor.c: check return value of mon_get_cpu before using ittarget/i386/monitor.c+5 -21 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-Daudé
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/2] fix segfaults caused by accessing CPU in empty machine

From: Ziyue Yang <[email protected]>

Many QEMU monitor commands, like "info lapic", "info tlb" and so on use mon_get_cpu or related wrappers to access CPU info without checking whether the CPU exists.
This patch series fix the "info lapic" case, and is the base of the incoming patch series aiming to eliminate segfaults caused by other QEMU commands trying to access CPU that doesn't exist.

Ziyue Yang (2):
monitor.c: make mon_get_cpu return NULL when there is no CPU target/i386/monitor.c: check return value of mon_get_cpu before using
it

 monitor.c             | 10 +++++++---
 target/i386/monitor.c |  7 +++++--
 2 files changed, 12 insertions(+), 5 deletions(-)

--
2.11.0