From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZguAP-0002tG-Jf for qemu-devel@nongnu.org; Tue, 29 Sep 2015 08:38:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZguAL-0001nH-G6 for qemu-devel@nongnu.org; Tue, 29 Sep 2015 08:37:57 -0400 From: Paolo Bonzini Date: Tue, 29 Sep 2015 14:37:40 +0200 Message-Id: <1443530263-32340-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] Fix dangling pointers from memory_region_init_* List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk, agraf@suse.de, armbru@redhat.com, blauwirbel@gmail.com, qemu-ppc@nongnu.org Some devices do not support a simple object_new/object_unref sequence because they leave dangling pointers under /machine. This series fixes this, for the case where the dangling pointers come from the memory API. Patch 1 avoids an assertion failure. Patches 2 and 3 fix the devices that Markus reported. Paolo Paolo Bonzini (3): memory: allow destroying a non-empty MemoryRegion hw: do not pass NULL to memory_region_init from instance_init macio: move DBDMA_init from instance_init to realize hw/arm/pxa2xx.c | 2 +- hw/display/cg3.c | 4 ++-- hw/display/tcx.c | 2 +- hw/misc/arm_integrator_debug.c | 2 +- hw/misc/macio/cuda.c | 2 +- hw/misc/macio/macio.c | 14 +++++++------- memory.c | 17 ++++++++++++++++- 7 files changed, 29 insertions(+), 14 deletions(-) -- 2.5.0