qemu-patch-raspberry4/hw/vfio
Alex Williamson 3a4dbe6aa9 vfio-pci: Fix missing unparent of dynamically allocated MemoryRegion
Commit d8d9581460 added explicit object_unparent() calls for
dynamically allocated MemoryRegions.  The VFIOMSIXInfo structure also
contains such a MemoryRegion, covering the mmap'd region of a PCI BAR
above the MSI-X table.  This structure is freed as part of the class
exit function and therefore also needs an explicit object_unparent().
Failing to do this results in random segfaults due to fields within
the structure, often the class pointer, being reclaimed and corrupted
by the time object_finalize_child_property() is called for the object.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-stable@nongnu.org # 2.2
2015-02-04 11:45:32 -07:00
..
common.c vfio: fix wrong initialize vfio_group_list 2015-02-04 11:45:32 -07:00
Makefile.objs hw/vfio: create common module 2014-12-22 09:54:51 -07:00
pci.c vfio-pci: Fix missing unparent of dynamically allocated MemoryRegion 2015-02-04 11:45:32 -07:00