From 337f57dd2c41ec70d6aaedd640eb16d7679d9839 Mon Sep 17 00:00:00 2001 From: Roman Kapl Date: Thu, 1 Mar 2018 09:12:20 -0500 Subject: [PATCH] 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. Backports commit 662a97d74f9b34cafe9aeb6d96620a97d768a1fa from qemu --- qemu/exec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qemu/exec.c b/qemu/exec.c index 904fc806..47222d44 100644 --- a/qemu/exec.c +++ b/qemu/exec.c @@ -2244,6 +2244,8 @@ 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)) { + // Unicorn: commented out + //rcu_read_unlock(); return false; } }