From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
Eduardo Habkost <ehabkost@redhat.com>,
libvir-list@redhat.com, Stefan Hajnoczi <stefanha@gmail.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>,
afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v9 2/3] qom: call class destructor before unparent
Date: Thu, 21 Mar 2013 13:25:50 +0100 [thread overview]
Message-ID: <514AFC4E.4070804@redhat.com> (raw)
In-Reply-To: <ff3eb77fc8260e634941cef66e7aa754ae9f91ee.1363633627.git.mst@redhat.com>
Il 21/03/2013 13:07, Michael S. Tsirkin ha scritto:
> Make sure object is valid when destructor is called.
"Make sure the object still has a canonical path while the unparent
callback is running".
Otherwise, the series looks good.
Paolo
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> qom/object.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/qom/object.c b/qom/object.c
> index 3d638ff..a0e3cbe 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -363,12 +363,12 @@ static void object_property_del_child(Object *obj, Object *child, Error **errp)
> void object_unparent(Object *obj)
> {
> object_ref(obj);
> - if (obj->parent) {
> - object_property_del_child(obj->parent, obj, NULL);
> - }
> if (obj->class->unparent) {
> (obj->class->unparent)(obj);
> }
> + if (obj->parent) {
> + object_property_del_child(obj->parent, obj, NULL);
> + }
> object_unref(obj);
> }
>
>
next prev parent reply other threads:[~2013-03-21 12:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 12:07 [Qemu-devel] [PATCH v9 0/3] DEVICE_DELETED event Michael S. Tsirkin
2013-03-21 12:07 ` [Qemu-devel] [PATCH v9 1/3] qdev: " Michael S. Tsirkin
2013-03-21 12:22 ` Markus Armbruster
2013-03-21 12:07 ` [Qemu-devel] [PATCH v9 2/3] qom: call class destructor before unparent Michael S. Tsirkin
2013-03-21 12:25 ` Paolo Bonzini [this message]
2013-03-21 12:30 ` Michael S. Tsirkin
2013-03-21 12:47 ` Paolo Bonzini
2013-03-21 12:07 ` [Qemu-devel] [PATCH v9 3/3] qmp: add path to device_deleted event Michael S. Tsirkin
2013-03-21 12:23 ` Markus Armbruster
2013-03-21 12:57 ` [Qemu-devel] [PATCH v9 0/3] DEVICE_DELETED event Andreas Färber
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=514AFC4E.4070804@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=libvir-list@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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.