From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIInn-0001VV-E1 for qemu-devel@nongnu.org; Tue, 25 Feb 2014 09:16:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIIne-0000ce-QD for qemu-devel@nongnu.org; Tue, 25 Feb 2014 09:16:07 -0500 Received: from mail-qc0-x229.google.com ([2607:f8b0:400d:c01::229]:48175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIIne-0000cX-M0 for qemu-devel@nongnu.org; Tue, 25 Feb 2014 09:15:58 -0500 Received: by mail-qc0-f169.google.com with SMTP id e9so8709291qcy.28 for ; Tue, 25 Feb 2014 06:15:58 -0800 (PST) Sender: Paolo Bonzini Message-ID: <530CA599.6090109@redhat.com> Date: Tue, 25 Feb 2014 15:15:53 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <53047351.80300@redhat.com> <20140219103657.4daed264@nial.usersys.redhat.com> <20140225102059.GA20627@G08FNSTD100614.fnst.cn.fujitsu.com> In-Reply-To: <20140225102059.GA20627@G08FNSTD100614.fnst.cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v18 13/14] memory backend: fill memory backend ram fields List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao , Igor Mammedov Cc: lersek@redhat.com, qemu-devel@nongnu.org, Wanlong Gao Il 25/02/2014 11:20, Hu Tao ha scritto: > There is a problem that user_creatable_complete() is called before > adding object to "/objects" (see object_create()), which triggers a > assert failure when calling object_get_canonical_path() in > ram_backend_memory_init(). Any ideas? You can call object_property_add_child before calling user_creatable_complete, and then call object_unparent (in addition to object_unref) if creation fails. Paolo