From: Marcel Apfelbaum <marcel.a@redhat.com>
To: Cole Robinson <crobinso@redhat.com>
Cc: "Marcin Gibuła" <m.gibula@beyond.pl>,
qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH for-2.0] qom: Fix crash with qom-list and link properties
Date: Thu, 10 Apr 2014 22:08:10 +0300 [thread overview]
Message-ID: <1397156890.28469.44.camel@localhost.localdomain> (raw)
In-Reply-To: <2f8f007ce2152ac3b65f0811199662799c509225.1397155389.git.crobinso@redhat.com>
On Thu, 2014-04-10 at 14:47 -0400, Cole Robinson 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 <m.gibula@beyond.pl>
> Signed-off-by: Cole Robinson <crobinso@redhat.com>
> ---
> 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;
Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>
You may want another review from maintainers :), but I think
the fix is fine.
Thanks,
Marcel
> } else if (object_property_is_child(prop)) {
> return prop->opaque;
> } else {
next prev parent reply other threads:[~2014-04-10 19:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 18:47 [Qemu-devel] [PATCH for-2.0] qom: Fix crash with qom-list and link properties Cole Robinson
2014-04-10 19:08 ` Marcel Apfelbaum [this message]
2014-04-11 16:38 ` Peter Maydell
2014-04-11 16:57 ` Andreas Färber
2014-04-11 17:05 ` Cole Robinson
2014-04-11 17:12 ` Andreas Färber
2014-04-11 17:05 ` Peter Maydell
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=1397156890.28469.44.camel@localhost.localdomain \
--to=marcel.a@redhat.com \
--cc=afaerber@suse.de \
--cc=crobinso@redhat.com \
--cc=m.gibula@beyond.pl \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 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).