|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug |
Date: | Thu, 02 Feb 2012 11:03:14 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15 |
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<address@hidden> --- 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
}
[Prev in Thread] | Current Thread | [Next in Thread] |