qemu/hw/i386
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
..
kvm apic: kvm-apic: Fix crash due to access to freed memory region 2016-07-20 12:02:19 -03:00
xen include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
acpi-build.c range: Eliminate direct Range member access 2016-07-04 16:49:33 +03:00
acpi-build.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
intel_iommu_internal.h intel_iommu: large page support 2016-02-06 20:44:10 +02:00
intel_iommu.c hw/iommu: enable iommu with -device 2016-07-04 14:50:58 +03:00
kvmvapic.c cpu-exec: Rename cpu_resume_from_signal() to cpu_loop_exit_noexc() 2016-06-09 15:55:02 +01:00
Makefile.objs pc: acpi: remove unused ASL templates and related blobs/utils 2016-01-09 23:20:19 +02:00
multiboot.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc_piix.c xen: fix ram init regression 2016-07-04 14:50:00 +03:00
pc_q35.c hw/iommu: enable iommu with -device 2016-07-04 14:50:58 +03:00
pc_sysfw.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
pc.c pc: Implement query-hotpluggable-cpus callback 2016-07-20 12:02:19 -03:00
pci-assign-load-rom.c pci-assign: Move "Invalid ROM" error message to pci-assign-load-rom.c 2016-06-29 14:03:47 +02:00
trace-events trace: split out trace events for hw/i386/ directory 2016-06-20 17:22:16 +01:00