]> git.proxmox.com Git - mirror_qemu.git/commit
linux-user: un-parent OBJECT(cpu) when closing thread
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 11 Aug 2022 15:14:06 +0000 (16:14 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 16 Aug 2022 08:57:07 +0000 (09:57 +0100)
commit52f0c1607671293afcdb2acc2f83e9bccbfa74bb
treefc89e7767eb703455992ad02b5808b757eec76e7
parentd102b8162a1e5fe8288d4d5c01801ce6536ac2d1
linux-user: un-parent OBJECT(cpu) when closing thread

While forcing the CPU to unrealize by hand does trigger the clean-up
code we never fully free resources because refcount never reaches
zero. This is because QOM automatically added objects without an
explicit parent to /unattached/, incrementing the refcount.

Instead of manually triggering unrealization just unparent the object
and let the device machinery deal with that for us.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/866
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20220811151413.3350684-2-alex.bennee@linaro.org>
linux-user/syscall.c