From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYtAb-0007r3-7C for qemu-devel@nongnu.org; Tue, 30 Sep 2014 04:52:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYtAT-0005Mm-IO for qemu-devel@nongnu.org; Tue, 30 Sep 2014 04:52:29 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:50882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYtAT-0005Hc-95 for qemu-devel@nongnu.org; Tue, 30 Sep 2014 04:52:21 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Sep 2014 09:52:15 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id AA1312190045 for ; Tue, 30 Sep 2014 09:51:51 +0100 (BST) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8U8qD0j60293284 for ; Tue, 30 Sep 2014 08:52:13 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8U8qCAk020950 for ; Tue, 30 Sep 2014 02:52:13 -0600 Date: Tue, 30 Sep 2014 10:52:07 +0200 From: Cornelia Huck Message-ID: <20140930105207.7a8b3698.cornelia.huck@de.ibm.com> In-Reply-To: <1412057438-10004-10-git-send-email-arei.gonglei@huawei.com> References: <1412057438-10004-1-git-send-email-arei.gonglei@huawei.com> <1412057438-10004-10-git-send-email-arei.gonglei@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 09/12] virtio-balloon: fix virtio-balloon child refcount in transports List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com Cc: weidong.huang@huawei.com, mst@redhat.com, armbru@redhat.com, luonengjun@huawei.com, agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, stefanha@redhat.com, pbonzini@redhat.com, peter.huangpeng@huawei.com, rth@twiddle.net On Tue, 30 Sep 2014 14:10:35 +0800 wrote: > From: Gonglei > > object_initialize() leaves the object with a refcount of 1. > object_property_add_child() adds its own reference which is dropped > again when the property is deleted. > > The upshot of this is that we always have a refcount >= 1. Upon hot > unplug the virtio-balloon child is not finalized! > > Drop our reference after the child property has been added to the > parent. > > Signed-off-by: Gonglei > --- > hw/s390x/virtio-ccw.c | 2 +- > hw/virtio/virtio-pci.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Cornelia Huck