qemu/backends
Lin Ma 36bce5ca5d hostmem: Prevent removing an in-use memory backend
showing a memory device whose memdev is removed leads an assert:

(qemu) object_add memory-backend-ram,id=ram0,size=128M
(qemu) device_add pc-dimm,id=d0,memdev=ram0
(qemu) object_del ram0
(qemu) info memory-devices
**
ERROR:qom/object.c:1274:object_get_canonical_path_component:\
                            assertion failed: (obj->parent != NULL)
Aborted

The patch prevents removing an in-use mem backend and error out.

Signed-off-by: Lin Ma <lma@suse.com>
Message-Id: <1427704589-7688-3-git-send-email-lma@suse.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-04-01 10:06:38 +02:00
..
Makefile.objs backends: Introduce chr-testdev 2014-08-06 17:53:05 +02:00
baum.c qemu-char: Rename register_char_driver_qapi() to register_char_driver() 2014-09-16 23:36:32 +01:00
hostmem-file.c hostmem: add property to map memory with MAP_SHARED 2014-06-19 18:44:20 +03:00
hostmem-ram.c hostmem-ram: don't exit qemu if size of memory-backend-ram is way too big 2014-09-09 13:41:44 +02:00
hostmem.c hostmem: Prevent removing an in-use memory backend 2015-04-01 10:06:38 +02:00
msmouse.c qemu-char: Rename register_char_driver_qapi() to register_char_driver() 2014-09-16 23:36:32 +01:00
rng-egd.c Revert "rng-egd: remove redundant free" 2014-09-18 21:51:24 +03:00
rng-random.c Drop superfluous conditionals around g_strdup() 2014-12-10 11:30:55 +03:00
rng.c qom: Clean up fragile use of error_is_set() in set() methods 2014-05-05 19:08:49 +02:00
testdev.c qemu-char: Rename register_char_driver_qapi() to register_char_driver() 2014-09-16 23:36:32 +01:00
tpm.c backends: Fix warning from Sparse 2015-03-19 11:11:55 +03:00