From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH qemu] RFC: memory/hmp: Print owners/parents in "info mtree"
Date: Thu, 19 Apr 2018 12:33:25 +0200 [thread overview]
Message-ID: <75bf706c-d2f2-e715-5b07-b651881e0a5e@redhat.com> (raw)
In-Reply-To: <d8efb96c-75a0-86fd-3615-57e9099afb5c@ozlabs.ru>
On 19/04/2018 04:41, Alexey Kardashevskiy wrote:
> it just seems to
> be a real case and majority of object_get_canonical_path_component() users
> do not test the returned pointer.
>
> ===================
> diff --git a/qom/object.c b/qom/object.c
> index 4677951..0c2d5c2 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -1645,7 +1645,9 @@ gchar *object_get_canonical_path_component(Object *obj)
> GHashTableIter iter;
>
> g_assert(obj);
> - g_assert(obj->parent != NULL);
I agree but why wouldn't the caller have crashed anyway on this assertion?
> as QMP crashes QEMU with this:
>
> {"execute": "qom-get", "arguments": {"path":
> "/machine/unattached/device[3]/smram[0]", "property": "container"}}
>
> with the patch it returns:
>
> {'return': '/<no-parent>/mem-container-smram[0]'}
The root cause of this is that the accelerator object is not added to
the QOM object tree.
Paolo
next prev parent reply other threads:[~2018-04-19 10:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 3:21 [Qemu-devel] [PATCH qemu] RFC: memory/hmp: Print owners/parents in "info mtree" Alexey Kardashevskiy
2018-04-11 18:57 ` Dr. David Alan Gilbert
2018-04-12 9:15 ` Paolo Bonzini
2018-04-16 13:20 ` Igor Mammedov
2018-04-16 13:30 ` Paolo Bonzini
2018-04-16 14:27 ` Igor Mammedov
2018-04-16 15:29 ` Paolo Bonzini
2018-04-17 12:18 ` Igor Mammedov
2018-04-17 16:31 ` Paolo Bonzini
2018-04-18 6:32 ` Markus Armbruster
2018-04-18 9:23 ` Paolo Bonzini
2018-04-19 2:41 ` Alexey Kardashevskiy
2018-04-19 10:33 ` Paolo Bonzini [this message]
2018-04-20 6:31 ` Alexey Kardashevskiy
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=75bf706c-d2f2-e715-5b07-b651881e0a5e@redhat.com \
--to=pbonzini@redhat.com \
--cc=aik@ozlabs.ru \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=imammedo@redhat.com \
--cc=qemu-devel@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).