qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: hutao@cn.fujitsu.com, qemu-devel@nongnu.org, armbru@redhat.com,
	aliguori@amazon.com, pbonzini@redhat.com,
	Amos Kong <akong@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3] qdev: move the code adding the device out of realize
Date: Mon, 3 Mar 2014 18:25:12 +0100	[thread overview]
Message-ID: <20140303182512.2468bb1d@nial.usersys.redhat.com> (raw)
In-Reply-To: <5314A623.8040908@suse.de>

On Mon, 03 Mar 2014 16:56:19 +0100
Andreas Färber <afaerber@suse.de> wrote:

> Am 03.03.2014 14:34, schrieb Igor Mammedov:
> > On Mon,  3 Mar 2014 15:57:55 +0800
> > Amos Kong <akong@redhat.com> wrote:
> > 
> > s/subj/qdev: set properties after device's parent is assigned/
> > 
> >> Test steps:
> >>  (qemu) device_add e1000,addr=adsf
> >>   Property 'e1000.addr' doesn't take value 'adsf'
> >>  (qemu) info qtree
> >>   Then qemu crashed.
> >>
> >> Currently we set a link to the new device for qdev parent bus, but the
> >> device hasn't been added to QOM tree. When it fails to set properties,
> >> object_unparent() can't cleanup the device.
> >>
> >> This patch moves the code adding the device output realize, when it fails
> >> to set properties, the device can be cleaned successfully.
> > Suggest rephrase as:
> > Delay device property setting until device's parent is assigned. This way
> > when property setting fails, object_unparent() can cleanup failed device
> > properly.
> > 
> > with above correction:
> > Reviewed-By: Igor Mammedov <imammedo@redhat.com>
> > 
> >>
> >> Signed-off-by: Amos Kong <akong@redhat.com>
> >> ---
> >> V2: fix bz by adjust the initialization order (Paolo)
> >> V3: fix bug without making it differs with legacy devices
> >>     creation (Andreas)
> 
> Perfect, I've tweaked the commit message along the lines of Igor's
> suggestion - please take a look if you want it changed differently:
> https://github.com/afaerber/qemu-cpu/commits/qom-next
I'm ok with it.
Thanks!

> 
> Thanks,
> Andreas
> 

      reply	other threads:[~2014-03-03 17:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03  7:57 [Qemu-devel] [PATCH v3] qdev: move the code adding the device out of realize Amos Kong
2014-03-03 13:34 ` Igor Mammedov
2014-03-03 15:56   ` Andreas Färber
2014-03-03 17:25     ` Igor Mammedov [this message]

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=20140303182512.2468bb1d@nial.usersys.redhat.com \
    --to=imammedo@redhat.com \
    --cc=afaerber@suse.de \
    --cc=akong@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=armbru@redhat.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=pbonzini@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).