]> git.ipfire.org Git - thirdparty/qemu.git/commit
vfio: Do not unparent in instance_finalize()
authorAkihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Wed, 24 Sep 2025 04:37:25 +0000 (13:37 +0900)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 24 Sep 2025 07:23:20 +0000 (09:23 +0200)
commit9b80f8a8e758b427501e6bcbcb114ae45ff68387
tree06d34f666810593d122d2cb8652b8e69def4bf8b
parent0c6d897e38f5a6a864d6ae6dc42f521b84011107
vfio: Do not unparent in instance_finalize()

Children are automatically unparented so manually unparenting is
unnecessary.

Worse, automatic unparenting happens before the instance_finalize()
callback of the parent gets called, so object_unparent() calls in
the callback will refer to objects that are already unparented, which
is semantically incorrect.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Link: https://lore.kernel.org/r/20250924-use-v4-6-07c6c598f53d@rsg.ci.i.u-tokyo.ac.jp
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/vfio/pci-quirks.c
hw/vfio/region.c