From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTAdK-00018A-Cg for qemu-devel@nongnu.org; Mon, 16 Jan 2017 11:59:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTAdH-00009u-CR for qemu-devel@nongnu.org; Mon, 16 Jan 2017 11:59:50 -0500 From: Paolo Bonzini Date: Mon, 16 Jan 2017 17:59:09 +0100 Message-Id: <20170116165916.8575-26-pbonzini@redhat.com> In-Reply-To: <20170116165916.8575-1-pbonzini@redhat.com> References: <20170116165916.8575-1-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 25/32] exec: Add missing rcu_read_unlock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Roman Kapl , qemu-stable@nongnu.org From: Roman Kapl 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 --- exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/exec.c b/exec.c index 47835c1..c95ae33 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; } } -- 2.9.3