Files
xemu/hw
Cédric Le Goater ebbf7c60bb vfio/container: Fix container object destruction
When commit 96b7af4388 intoduced a .instance_finalize() handler,
it did not take into account that the container was not necessarily
inserted into the container list of the address space. Hence, if
the container object is destroyed, by calling object_unref() for
example, before vfio_address_space_insert() is called, QEMU may
crash when removing the container from the list as done in
vfio_container_instance_finalize(). This was seen with an SEV-SNP
guest for which discarding of RAM fails.

To resolve this issue, use the safe version of QLIST_REMOVE().

Cc: Zhenzhong Duan <zhenzhong.duan@intel.com>
Cc: Eric Auger <eric.auger@redhat.com>
Fixes: 96b7af4388 ("vfio/container: Move vfio_container_destroy() to an instance_finalize() handler")
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2024-11-18 08:40:06 +01:00
..
2024-10-15 15:16:17 +01:00
…
2024-11-09 08:34:00 +01:00
…
2024-10-28 16:56:36 +00:00
2024-10-01 14:58:07 +01:00
2024-10-03 19:33:23 +02:00
2024-10-01 14:41:10 +01:00
…
2024-10-03 17:26:06 +03:00
2024-10-03 19:33:23 +02:00
…
2024-10-03 19:33:23 +02:00
2024-10-15 15:16:17 +01:00
2024-10-15 15:16:17 +01:00