[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/4] qom: link property fixes
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 0/4] qom: link property fixes |
Date: |
Wed, 05 Mar 2014 10:24:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
Am 05.03.2014 09:14, schrieb Paolo Bonzini:
> Il 04/03/2014 22:45, Stefan Hajnoczi ha scritto:
>> There are two problems with QOM link properties:
>>
>> 1. There are refcount leaks in many object_property_add_link() callers.
>> 2. There is no way to prevent link properties from being set after a
>> device is
>> realized.
>>
>> This patch series fixes these issues by extending the
>> object_property_add_link() function.
>
> Thanks for looking into this! Just two (mostly) cosmetic comments:
>
> 1) in patch 2 we could use a flags argument instead of a "bool". This
> is more easily extensible and self-documenting.
I wonder if we can do this more cleverly: The two ways a link<> property
can get set that I can think of are either a) assigning the field a new
value in C code or b) using object_property_set_link() with a textual
path. Can't the latter simply save an unref flag within the property's
opaque when used?
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 0/4] qom: link property fixes, Stefan Hajnoczi, 2014/03/04
- [Qemu-devel] [PATCH 2/4] qom: make QOM link property unref optional, Stefan Hajnoczi, 2014/03/04
- [Qemu-devel] [PATCH 1/4] qom: split object_property_set_link(), Stefan Hajnoczi, 2014/03/04
- [Qemu-devel] [PATCH 3/4] qom: add set() argument to object_property_add_link(), Stefan Hajnoczi, 2014/03/04
- [Qemu-devel] [PATCH 4/4] virtio-rng: avoid default_backend refcount leak, Stefan Hajnoczi, 2014/03/04
- Re: [Qemu-devel] [PATCH 0/4] qom: link property fixes, Paolo Bonzini, 2014/03/05
- Re: [Qemu-devel] [PATCH 0/4] qom: link property fixes,
Andreas Färber <=