summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kapl <rka@sysgo.com>2017-01-09 12:09:21 +0100
committerMichael Roth <mdroth@linux.vnet.ibm.com>2017-03-16 12:10:39 -0500
commit662a97d74f9b34cafe9aeb6d96620a97d768a1fa (patch)
tree706d37092704a4e02cb04f833601a74e04641da8
parentd6f119475d3c9c913f9140771895036be66d5c33 (diff)
downloadqemu-662a97d74f9b34cafe9aeb6d96620a97d768a1fa.tar.gz
exec: Add missing rcu_read_unlock
rcu_read_unlock was not called if the address_space_access_valid result is negative. This caused (at least) a problem when qemu on PPC/E500+TAP failed to terminate properly and instead got stuck in a deadlock. Signed-off-by: Roman Kapl <rka@sysgo.com> Message-Id: <20170109110921.4931-1-rka@sysgo.com> Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit 5ad4a2b75f85dd854a781a6e03b90320cb3441d3) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--exec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index 08c558eecf..6fda4553fa 100644
--- a/exec.c
+++ b/exec.c
@@ -2927,6 +2927,7 @@ bool address_space_access_valid(AddressSpace *as, hwaddr addr, int len, bool is_
if (!memory_access_is_direct(mr, is_write)) {
l = memory_access_size(mr, l, addr);
if (!memory_region_access_valid(mr, xlat, l, is_write)) {
+ rcu_read_unlock();
return false;
}
}