From: Laurent Vivier Date: Tue, 16 Nov 2021 15:08:37 +0000 (+0100) Subject: pmu: fix pmu vmstate subsection list X-Git-Tag: v6.2.0-rc2~14^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=14554b3dccae18ddc58d39654443c8e4551252c9;p=thirdparty%2Fqemu.git pmu: fix pmu vmstate subsection list The subsection is not closed by a NULL marker so this can trigger a segfault when the pmu vmstate is saved. This can be easily shown with: $ ./qemu-system-ppc64 -dump-vmstate vmstate.json Segmentation fault (core dumped) Fixes: d811d61fbc6c ("mac_newworld: add PMU device") Cc: mark.cave-ayland@ilande.co.uk Signed-off-by: Laurent Vivier Reviewed-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Signed-off-by: Cédric Le Goater --- diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c index 4ad4f50e08c..eb39c64694a 100644 --- a/hw/misc/macio/pmu.c +++ b/hw/misc/macio/pmu.c @@ -718,6 +718,7 @@ static const VMStateDescription vmstate_pmu = { }, .subsections = (const VMStateDescription * []) { &vmstate_pmu_adb, + NULL } };