From: "Michael S. Tsirkin" <mst@redhat.com>
To: Peng Liang <liangpeng10@huawei.com>
Cc: imammedo@redhat.com, zhang.zhanghailiang@huawei.com,
qemu-devel@nongnu.org, xiexiangyou@huawei.com,
dgilbert@redhat.com
Subject: Re: [PATCH v2] ACPI: Avoid infinite recursion when dump-vmstate
Date: Thu, 12 Nov 2020 03:56:21 -0500 [thread overview]
Message-ID: <20201112035613-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20201112020638.874515-1-liangpeng10@huawei.com>
On Thu, Nov 12, 2020 at 10:06:38AM +0800, Peng Liang wrote:
> There is a field with vmstate_ghes_state as vmsd in vmstate_ghes_state,
> which will lead to infinite recursion in dump_vmstate_vmsd.
>
> Fixes: a08a64627b ("ACPI: Record the Generic Error Status Block address")
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Peng Liang <liangpeng10@huawei.com>
> Acked-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/acpi/generic_event_device.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
> index 6df400e1ee16..5454be67d5f0 100644
> --- a/hw/acpi/generic_event_device.c
> +++ b/hw/acpi/generic_event_device.c
> @@ -322,6 +322,16 @@ static const VMStateDescription vmstate_ged_state = {
> }
> };
>
> +static const VMStateDescription vmstate_ghes = {
> + .name = "acpi-ghes",
> + .version_id = 1,
> + .minimum_version_id = 1,
> + .fields = (VMStateField[]) {
> + VMSTATE_UINT64(ghes_addr_le, AcpiGhesState),
> + VMSTATE_END_OF_LIST()
> + },
> +};
> +
> static bool ghes_needed(void *opaque)
> {
> AcpiGedState *s = opaque;
> @@ -335,7 +345,7 @@ static const VMStateDescription vmstate_ghes_state = {
> .needed = ghes_needed,
> .fields = (VMStateField[]) {
> VMSTATE_STRUCT(ghes_state, AcpiGedState, 1,
> - vmstate_ghes_state, AcpiGhesState),
> + vmstate_ghes, AcpiGhesState),
> VMSTATE_END_OF_LIST()
> }
> };
> --
> 2.26.2
next prev parent reply other threads:[~2020-11-12 8:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 2:06 [PATCH v2] ACPI: Avoid infinite recursion when dump-vmstate Peng Liang
2020-11-12 8:56 ` Michael S. Tsirkin [this message]
2020-11-12 14:14 ` Dr. David Alan Gilbert
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=20201112035613-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=dgilbert@redhat.com \
--cc=imammedo@redhat.com \
--cc=liangpeng10@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=xiexiangyou@huawei.com \
--cc=zhang.zhanghailiang@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.