[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1.3 1/5] qom: fix refcount of non-heap-allocated
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 1.3 1/5] qom: fix refcount of non-heap-allocated objects |
Date: |
Fri, 23 Nov 2012 17:49:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2 |
Am 23.11.2012 09:47, schrieb Paolo Bonzini:
> The reference count for embedded objects is always one too low, because
> object_initialize_with_type returns with zero references to the object.
> This causes premature finalization of the object (or an assertion failure)
> after calling object_ref to add an extra reference and object_unref to
> remove it.
>
> The fix is to move the initial object_ref call from object_new_with_type
> to object_initialize_with_type.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
Acked-by: Andreas Färber <address@hidden>
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH 1.3 0/5] QOM/qdev lifetime fixes, Paolo Bonzini, 2012/11/23
- [Qemu-devel] [PATCH 1.3 4/5] qdev: simplify (de)allocation of buses, Paolo Bonzini, 2012/11/23
- [Qemu-devel] [PATCH 1.3 2/5] qdev: move bus removal to object_unparent, Paolo Bonzini, 2012/11/23
- [Qemu-devel] [PATCH 1.3 1/5] qom: fix refcount of non-heap-allocated objects, Paolo Bonzini, 2012/11/23
- [Qemu-devel] [PATCH 1.3 3/5] qom: make object_delete usable for statically-allocated objects, Paolo Bonzini, 2012/11/23
- [Qemu-devel] [PATCH 1.3 5/5] qom: make object_finalize static, Paolo Bonzini, 2012/11/23
- Re: [Qemu-devel] [PATCH 1.3 0/5] QOM/qdev lifetime fixes, Anthony Liguori, 2012/11/26