From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt04D-0005J5-Qu for qemu-devel@nongnu.org; Thu, 02 Feb 2012 12:03:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rt047-0006RS-RW for qemu-devel@nongnu.org; Thu, 02 Feb 2012 12:03:25 -0500 Received: from mail-pz0-f45.google.com ([209.85.210.45]:37091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt047-0006RN-Mx for qemu-devel@nongnu.org; Thu, 02 Feb 2012 12:03:19 -0500 Received: by dadp14 with SMTP id p14so2521887dad.4 for ; Thu, 02 Feb 2012 09:03:18 -0800 (PST) Message-ID: <4F2AC1D2.9090606@codemonkey.ws> Date: Thu, 02 Feb 2012 11:03:14 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1328201142-26145-1-git-send-email-pbonzini@redhat.com> <1328201142-26145-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1328201142-26145-2-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On 02/02/2012 10:45 AM, Paolo Bonzini wrote: > The reference that is returned by qdev_device_add is never given > back, so that device_del does not cause the refcount to go to zero > (and thus does nothing). > > Signed-off-by: Paolo Bonzini > --- > vl.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/vl.c b/vl.c > index d88a18c..c63af69 100644 > --- a/vl.c > +++ b/vl.c > @@ -1746,6 +1746,7 @@ static int device_init_func(QemuOpts *opts, void *opaque) > dev = qdev_device_add(opts); > if (!dev) > return -1; > + object_unref(OBJECT(dev)); > return 0; Is this still needed with qom-upstream.14? I fixed a bug on .14 that involved child properties that was making device-del sometimes fail. If it is, what's your test case? I have a device_del test case that seems to be working right now without this patch. Regards, Anthony Liguori > } >