exec: Add missing rcu_read_unlock
PATCH 1/1 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 <[email protected]>
--- exec.c | 1 + 1 file changed, 1 insertion(+)
exec.c +1 -0
@@ -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; } }
Signature · 1 line
2.10.1
Quoted 17 lines · Roman Kapl
rcu_read_unlockwas not called if theaddress_space_access_validresult 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 <[email protected]>--- exec.c | 1 + 1 file changed, 1 insertion(+)exec.c +0
-0
exec.c bool address_space_access_valid(AddressSpace *as, hwaddr addr, int len, bool is_ · line 2933
Quoted 7 lines
exec.c +1
-0@@ -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; } }
Thanks, queued!
Cc qemu-stable <[email protected]>
Paolo