qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH RFC 1/4] PPC: TCG: Correct SEGV when smp_threads >


From: Greg Kurz
Subject: Re: [Qemu-ppc] [PATCH RFC 1/4] PPC: TCG: Correct SEGV when smp_threads > 1
Date: Tue, 27 Jun 2017 18:40:35 +0200

On Tue, 27 Jun 2017 10:22:26 +1000
Sam Bobroff <address@hidden> wrote:

> QEMU currently segfaults on PPC when starting a VM with more than one
> thread/core when using TCG. This is not a valid configuration but it
> should present an error report rather than crashing.
> 
> This seems to have been a latent bug in spapr_cpu_core_realize_child()
> recently uncovered by commit 9ed656631d73a7564dfe178ca8c48bf049098aaf.
> 
> Correct it by avoiding unparenting when there is no parent.
> 
> Signed-off-by: Sam Bobroff <address@hidden>
> ---

Hi Sam,

This already got fixed with commit 7ab27f6f2f06 ("spapr: prevent QEMU crash when
CPU realization fails").

Cheers,

--
Greg

>  hw/ppc/spapr_cpu_core.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
> index 9fb896b407..a504765506 100644
> --- a/hw/ppc/spapr_cpu_core.c
> +++ b/hw/ppc/spapr_cpu_core.c
> @@ -157,13 +157,14 @@ static void spapr_cpu_core_realize_child(Object *child, 
> Error **errp)
>      object_property_add_const_link(obj, ICP_PROP_CPU, child, &error_abort);
>      object_property_set_bool(obj, true, "realized", &local_err);
>      if (local_err) {
> -        goto error;
> +        goto error_unparent;
>      }
>  
>      return;
>  
> -error:
> +error_unparent:
>      object_unparent(obj);
> +error:
>      error_propagate(errp, local_err);
>  }
>  

Attachment: pgprht33cbXbZ.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]