From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgZN1-0002I3-NV for qemu-devel@nongnu.org; Mon, 28 Sep 2015 10:25:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgZMw-0001iH-PD for qemu-devel@nongnu.org; Mon, 28 Sep 2015 10:25:35 -0400 References: <1443121042-3409-1-git-send-email-armbru@redhat.com> <1443121042-3409-7-git-send-email-armbru@redhat.com> <56054E5E.3090005@redhat.com> <87y4fu1t3j.fsf@blackfin.pond.sub.org> <560590A6.3030408@redhat.com> <87io6vm08l.fsf@blackfin.pond.sub.org> <5608FC3B.7080601@redhat.com> <87io6ud3wg.fsf@blackfin.pond.sub.org> From: Paolo Bonzini Message-ID: <56094DD3.2020505@redhat.com> Date: Mon, 28 Sep 2015 16:25:23 +0200 MIME-Version: 1.0 In-Reply-To: <87io6ud3wg.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Peter Maydell , Thomas Huth , ehabkost@redhat.com, Peter Crosthwaite , qemu-devel@nongnu.org, qemu-stable@nongnu.org, Christian Borntraeger , Alexander Graf , qemu-ppc@nongnu.org, Antony Pavlov , stefanha@redhat.com, Cornelia Huck , Alistair Francis , afaerber@suse.de, Li Guang , Richard Henderson On 28/09/2015 16:17, Markus Armbruster wrote: >> The reason why this particular call has a NULL owner is that the >> (non-qdevified) DBDMA_init object inside it is also passing a NULL >> owner. DBDMA_init object is also doing a few more non-idempotent things >> such as a malloc, a vmstate_register and a qemu_register_reset. I missed a step here: "... thus macio really cannot_be_created_even_by_object_new_yet". > * hw/misc/omap_gpmc.c omap_gpmc_cs_map() > > Is this sane? I guess the object_unparent() in omap_gpmc_cs_unmap() > could make it sane. > > * hw/ppc/ppc4xx_devs.c sdram_set_bcr() > > Is this sane? I guess the object_unparent() there could make it sane. Yes and yes. There are many more similar places that you missed, which call memory_region_init_alias(), memory_region_init_io() and memory_region_init_ram(). Those are the same. Paolo