qemu/hw/i386/kvm
Igor Mammedov 365aa1131f apic: kvm-apic: Fix crash due to access to freed memory region
kvm-apic.io_memory memory region had its parent set to NULL at
memory_region_init_io() time, so it ended up as a child in
 /unattached contaner.
As result when kvm-apic instance was deleted, the child property
 /unattached/kvm-apic-msi[XXX] contained a reference to
kvm-apic.io_memory address which was freed as part of kvm-apic.

Do the same as 'apic' and make kvm-apic instance the owner
of the memory region so that it won't end up in /unattached
and gets cleanly released along with related kvm-apic instance.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2016-07-20 12:02:19 -03:00
..
apic.c apic: kvm-apic: Fix crash due to access to freed memory region 2016-07-20 12:02:19 -03:00
clock.c qemu-common: push cpu.h inclusion out of qemu-common.h 2016-05-19 16:42:29 +02:00
i8254.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
i8259.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
ioapic.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
Makefile.objs hw: move hw/kvm/ to hw/i386/kvm 2013-04-08 18:13:16 +02:00
pci-assign.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00