qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.0] qom: Fix crash with qom-list and link p


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH for-2.0] qom: Fix crash with qom-list and link properties
Date: Fri, 11 Apr 2014 17:38:43 +0100

On 10 April 2014 19:47, Cole Robinson <address@hidden> wrote:
> Commit 9561fda8d90e176bef598ba87c42a1bd6ad03ef7 changed the type of
> 'opaque' for link properties, but missed updating this call site.
> Reproducer:
>
> ./x86_64-softmmu/qemu-system-x86_64 -qmp unix:./qmp.sock,server &
> ./scripts/qmp/qmp-shell ./qmp.sock
> (QEMU) qom-list path=//machine/i440fx/pci.0/child[2]
>
> Reported-by: Marcin Gibuła <address@hidden>
> Signed-off-by: Cole Robinson <address@hidden>
> ---
>  qom/object.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qom/object.c b/qom/object.c
> index f4de619..9a730e7 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -1225,7 +1225,8 @@ Object *object_resolve_path_component(Object *parent, 
> const gchar *part)
>      }
>
>      if (object_property_is_link(prop)) {
> -        return *(Object **)prop->opaque;
> +        LinkProperty *lprop = prop->opaque;
> +        return *lprop->child;
>      } else if (object_property_is_child(prop)) {
>          return prop->opaque;
>      } else {
> --
> 1.9.0

Reviewed-by: Peter Maydell <address@hidden>

-- PMM



reply via email to

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