Re: [Qemu-devel] [PATCH] qdev: unparent device when fails to set properties

2014-01-01 Thread Amos Kong
On Tue, Dec 31, 2013 at 05:06:44PM +0100, Paolo Bonzini wrote: > Il 31/12/2013 09:06, Amos Kong ha scritto: > > When it fails to set properties, qdev's parent is already set > > Do not confuse the QOM parent (which is /machine/peripheral, of which > the new device is a child) with the qdev parent

Re: [Qemu-devel] [PATCH] qdev: unparent device when fails to set properties

2013-12-31 Thread Paolo Bonzini
Il 31/12/2013 09:06, Amos Kong ha scritto: > When it fails to set properties, qdev's parent is already set Do not confuse the QOM parent (which is /machine/peripheral, of which the new device is a child) with the qdev parent bus (which has a link to the new device)! In general, you should add the

Re: [Qemu-devel] [PATCH] qdev: unparent device when fails to set properties

2013-12-31 Thread Amos Kong
On Tue, Dec 31, 2013 at 05:09:36PM +0800, Hu Tao wrote: > On Tue, Dec 31, 2013 at 04:06:57PM +0800, Amos Kong wrote: > > Test steps: > > (qemu) device_add e1000,addr=adsf > > Property 'e1000.addr' doesn't take value 'adsf' > > (qemu) info qtree > > Then qemu crashed. > > > > When it fails to

Re: [Qemu-devel] [PATCH] qdev: unparent device when fails to set properties

2013-12-31 Thread Hu Tao
On Tue, Dec 31, 2013 at 04:06:57PM +0800, Amos Kong wrote: > Test steps: > (qemu) device_add e1000,addr=adsf > Property 'e1000.addr' doesn't take value 'adsf' > (qemu) info qtree > Then qemu crashed. > > When it fails to set properties, qdev's parent is already set, but the > object hasn't b