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>
This commit is contained in:
parent
67f9968ce3
commit
14554b3dcc
@ -718,6 +718,7 @@ static const VMStateDescription vmstate_pmu = {
|
|||||||
},
|
},
|
||||||
.subsections = (const VMStateDescription * []) {
|
.subsections = (const VMStateDescription * []) {
|
||||||
&vmstate_pmu_adb,
|
&vmstate_pmu_adb,
|
||||||
|
NULL
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user