qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/5] qom: link property fixes
@ 2014-03-05 20:51 Stefan Hajnoczi
  2014-03-05 20:51 ` [Qemu-devel] [PATCH v3 1/5] qom: split object_property_set_link() Stefan Hajnoczi
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2014-03-05 20:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Andreas Faerber, Anthony Liguori, Peter Maydell

v3:
 * Split first commit for easier reviewing [afaerber]
 * Turn bool argument into flags bitmask [pbonzini]
 * Rename set() callback to check() [pbonzini]
 * Rename object_property_default_set_link() to
   object_property_allow_set_link()
 * Rename qdev_prop_default_set_link() to
   qdev_prop_allow_set_link_before_realize()

v2:
 * A NULL set() callback should make the property read-only

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.

Stefan Hajnoczi (5):
  qom: split object_property_set_link()
  qom: don't make link NULL on object_property_set_link() failure
  qom: make QOM link property unref optional
  qom: add check() argument to object_property_add_link()
  virtio-rng: avoid default_backend refcount leak

 hw/core/qdev-properties.c    |  12 ++++
 hw/core/qdev.c               |  10 +++-
 hw/dma/xilinx_axidma.c       |  20 +++++--
 hw/net/xilinx_axienet.c      |  20 +++++--
 hw/pcmcia/pxa2xx.c           |   4 +-
 hw/s390x/s390-virtio-bus.c   |   4 +-
 hw/s390x/virtio-ccw.c        |   4 +-
 hw/virtio/virtio-pci.c       |   4 +-
 hw/virtio/virtio-rng.c       |   7 ++-
 include/hw/qdev-properties.h |  11 ++++
 include/qom/object.h         |  29 +++++++++-
 qom/object.c                 | 130 ++++++++++++++++++++++++++++++++-----------
 ui/console.c                 |   5 +-
 13 files changed, 211 insertions(+), 49 deletions(-)

-- 
1.8.5.3

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-18 12:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 20:51 [Qemu-devel] [PATCH v3 0/5] qom: link property fixes Stefan Hajnoczi
2014-03-05 20:51 ` [Qemu-devel] [PATCH v3 1/5] qom: split object_property_set_link() Stefan Hajnoczi
2014-03-05 20:51 ` [Qemu-devel] [PATCH v3 2/5] qom: don't make link NULL on object_property_set_link() failure Stefan Hajnoczi
2014-03-05 20:51 ` [Qemu-devel] [PATCH v3 3/5] qom: make QOM link property unref optional Stefan Hajnoczi
2014-03-05 20:51 ` [Qemu-devel] [PATCH v3 4/5] qom: add check() argument to object_property_add_link() Stefan Hajnoczi
2014-03-05 20:51 ` [Qemu-devel] [PATCH v3 5/5] virtio-rng: avoid default_backend refcount leak Stefan Hajnoczi
2014-03-18 12:27 ` [Qemu-devel] [PATCH v3 0/5] qom: link property fixes Stefan Hajnoczi
2014-03-18 12:51 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).