From: Roman Kapl Date: Mon, 9 Jan 2017 11:09:21 +0000 (+0100) Subject: exec: Add missing rcu_read_unlock X-Git-Tag: v2.9.0-rc0~139^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ad4a2b75f85dd854a781a6e03b90320cb3441d3;p=thirdparty%2Fqemu.git 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 Message-Id: <20170109110921.4931-1-rka@sysgo.com> Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini --- diff --git a/exec.c b/exec.c index 47835c1dc18..c95ae3344de 100644 --- a/exec.c +++ b/exec.c @@ -2960,6 +2960,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; } }