aboutsummaryrefslogtreecommitdiff
path: root/target-unicore32
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-07-27 16:29:56 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-07-27 23:05:49 +0200
commit52c91dac6bd891656f297dab76da51fc8bc61309 (patch)
tree5ae829b25f1ed315042ede4f3642104d101d929d /target-unicore32
parent55875fc4ca45a35e36134663ade946d86fe7bfcd (diff)
memory: do not add a reference to the owner of aliased regions
Very often the owner of the aliased region is the same as the owner of the alias region itself. When this happens, the reference count can never go back to 0 and the owner is leaked. This is for example breaking hot-unplug of virtio-pci devices (the device cannot be plugged back again with the same id). Another common use for alias is to transform the system I/O address space into an MMIO regions; in this case the aliased region never dies, so there is no problem. Otherwise the owner is always the same for aliasing and aliased region. I checked all calls to memory_region_init_alias introduced after commit dfde4e6 (memory: add ref/unref calls, 2013-05-06) and they do not need the reference in order to keep the owner of the aliased region alive. Reported-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-unicore32')
0 files changed, 0 insertions, 0 deletions