[PATCH 0/2] qom: Tighten object lifetime handling

Akihiko Odaki posted 2 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260615-embedded-v1-0-bb0c65bf126c@rsg.ci.i.u-tokyo.ac.jp
Maintainers: Alberto Garcia <berto@igalia.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
include/qom/object.h            | 39 ++++++++++++++++-----
block/throttle-groups.c         |  2 +-
qom/object.c                    | 75 +++++++++++++++++++++++++++++++----------
tests/unit/check-qom-proplist.c |  8 ++---
rust/qom/src/qom.rs             |  8 ++---
5 files changed, 98 insertions(+), 34 deletions(-)
[PATCH 0/2] qom: Tighten object lifetime handling
Posted by Akihiko Odaki 1 month, 1 week ago
QOM has extensive assertions and prevents most cases that would trigger
undefined behavior, but two corner cases still need explicit handling:
temporary object resurrection during finalization, and references to
embedded objects. This series covers both cases.

The temporary object resurrection patch originated from:
https://lore.kernel.org/qemu-devel/20250906-mr-v2-1-2820f5a3d282@rsg.ci.i.u-tokyo.ac.jp/
("[PATCH v2 1/3] qom: Do not finalize twice")

I also plan to make the embedded object reference handling a
prerequisite for the next version of the following series:
https://lore.kernel.org/qemu-devel/20250917-qom-v1-0-7262db7b0a84@rsg.ci.i.u-tokyo.ac.jp/
("[PATCH 00/35] memory: QOM-ify AddressSpace")

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
---
Akihiko Odaki (2):
      qom: Reject temporary object resurrection
      qom: Manage references to embedded child objects

 include/qom/object.h            | 39 ++++++++++++++++-----
 block/throttle-groups.c         |  2 +-
 qom/object.c                    | 75 +++++++++++++++++++++++++++++++----------
 tests/unit/check-qom-proplist.c |  8 ++---
 rust/qom/src/qom.rs             |  8 ++---
 5 files changed, 98 insertions(+), 34 deletions(-)
---
base-commit: 2db91528542672cf0db78b3f2cc0e22b36302b38
change-id: 20260614-embedded-00ca98fcdb5c

Best regards,
--  
Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>