aboutsummaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2021-11-16 16:08:37 +0100
committerCédric Le Goater <clg@kaod.org>2021-11-17 19:10:44 +0100
commit14554b3dccae18ddc58d39654443c8e4551252c9 (patch)
treefaf8dee873d8cf56bac8de977c010c6ec8e250eb /hw/misc
parent67f9968ce3f0847ffddb6ee2837a3641acd92abf (diff)
downloadqemu-14554b3dccae18ddc58d39654443c8e4551252c9.zip
qemu-14554b3dccae18ddc58d39654443c8e4551252c9.tar.gz
qemu-14554b3dccae18ddc58d39654443c8e4551252c9.tar.bz2
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 <lvivier@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/macio/pmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c
index 4ad4f50..eb39c64 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
}
};