summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-07-14 13:45:34 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-07-16 20:00:20 +0200
commitc6742b14fe7352059cd4954a356a8105757af31b (patch)
treeeae15d976e0f23a28cc004a44ca863ed440cb888 /crypto
parent24b41d66c8ad8f77839fca777b92e365dad0cf5c (diff)
downloadqemu-c6742b14fe7352059cd4954a356a8105757af31b.tar.gz
memory: fix refcount leak in memory_region_present
memory_region_present() leaks a reference to a MemoryRegion in the case "mr == container". While fixing it, avoid reference counting altogether for memory_region_present(), by using RCU only. The return value could in principle be already invalid immediately after memory_region_present returns, but presumably the caller knows that and it's using memory_region_present to probe for devices that are unpluggable, or something like that. The RCU critical section is needed anyway, because it protects as->current_map. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions