All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH 0/4] qom: link property fixes
Date: Wed, 05 Mar 2014 10:31:27 +0100	[thread overview]
Message-ID: <5316EEEF.30901@redhat.com> (raw)
In-Reply-To: <5316ED59.8010400@suse.de>

Il 05/03/2014 10:24, Andreas Färber ha scritto:
> 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?

Sounds too magic...

Paolo

      reply	other threads:[~2014-03-05  9:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 21:45 [Qemu-devel] [PATCH 0/4] qom: link property fixes Stefan Hajnoczi
2014-03-04 21:45 ` [Qemu-devel] [PATCH 1/4] qom: split object_property_set_link() Stefan Hajnoczi
2014-03-05  9:26   ` Andreas Färber
2014-03-04 21:45 ` [Qemu-devel] [PATCH 2/4] qom: make QOM link property unref optional Stefan Hajnoczi
2014-03-04 21:45 ` [Qemu-devel] [PATCH 3/4] qom: add set() argument to object_property_add_link() Stefan Hajnoczi
2014-03-04 21:45 ` [Qemu-devel] [PATCH 4/4] virtio-rng: avoid default_backend refcount leak Stefan Hajnoczi
2014-03-05  8:14 ` [Qemu-devel] [PATCH 0/4] qom: link property fixes Paolo Bonzini
2014-03-05  9:24   ` Andreas Färber
2014-03-05  9:31     ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5316EEEF.30901@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.