From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>, qemu-devel@nongnu.org
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, qemu-ppc@nongnu.org
Subject: Re: [PATCH] pmu: fix pmu vmstate subsection list
Date: Tue, 16 Nov 2021 16:44:33 +0100 [thread overview]
Message-ID: <b0ad5a1f-3f5e-7252-5e4d-d7b4b5ea3aa8@redhat.com> (raw)
In-Reply-To: <20211116150837.169291-1-lvivier@redhat.com>
On 11/16/21 16:08, Laurent Vivier wrote:
> 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>
> ---
> hw/misc/macio/pmu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c
> index 4ad4f50e08c3..eb39c64694aa 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
> }
> };
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
BTW I ran 'git grep -W -F .subsections' and couldn't find other
occurrence.
next prev parent reply other threads:[~2021-11-16 15:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 15:08 [PATCH] pmu: fix pmu vmstate subsection list Laurent Vivier
2021-11-16 15:20 ` Greg Kurz
2021-11-17 11:03 ` Cédric Le Goater
2021-11-16 15:44 ` Philippe Mathieu-Daudé [this message]
2021-11-16 19:50 ` Mark Cave-Ayland
2021-11-17 18:13 ` Cédric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b0ad5a1f-3f5e-7252-5e4d-d7b4b5ea3aa8@redhat.com \
--to=philmd@redhat.com \
--cc=lvivier@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).