From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKVJH-0003HV-8A for qemu-devel@nongnu.org; Mon, 03 Mar 2014 11:01:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKVJB-0008V9-CW for qemu-devel@nongnu.org; Mon, 03 Mar 2014 11:01:43 -0500 Received: from cantor2.suse.de ([195.135.220.15]:40734 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKVJB-0008V5-6I for qemu-devel@nongnu.org; Mon, 03 Mar 2014 11:01:37 -0500 Message-ID: <5314A75E.6030007@suse.de> Date: Mon, 03 Mar 2014 17:01:34 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1393862124-26806-1-git-send-email-akong@redhat.com> In-Reply-To: <1393862124-26806-1-git-send-email-akong@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PCTCH v4] qdev: set properties after device's parent is assigned List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong , qemu-devel@nongnu.org Cc: hutao@cn.fujitsu.com, armbru@redhat.com, aliguori@amazon.com, pbonzini@redhat.com Hi, Am 03.03.2014 16:55, schrieb Amos Kong: > Test steps: > (qemu) device_add e1000,addr=3Dadsf > Property 'e1000.addr' doesn't take value 'adsf' > (qemu) info qtree > Then qemu crashed. >=20 > 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. >=20 > Delay device property setting until device's parent is assigned. This > way when property setting fails, object_unparent() can cleanup failed > device properly. >=20 > Signed-off-by: Amos Kong > Reviewed-By: Igor Mammedov > --- > V2: fix bz by adjust the initialization order (Paolo) > V3: fix bug without making it differs with legacy devices > creation (Andreas) > V4: update subject and commitlog I already applied a variation of v3. In particular I used qdev-monitor for consistency and clarified that it is about device_add. https://github.com/afaerber/qemu-cpu/commits/qom-next If you don't like something in there, can you please just suggest an alternative sentence/paragraph for me to update? Thanks, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg