qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-stable] [PULL 26/33] exec: Add missing rcu_read_unlock


From: Paolo Bonzini
Subject: [Qemu-stable] [PULL 26/33] exec: Add missing rcu_read_unlock
Date: Wed, 11 Jan 2017 20:35:20 +0100

From: Roman Kapl <address@hidden>

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 <address@hidden>
Message-Id: <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
---
 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;
             }
         }
-- 
1.8.3.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]