Skip to contentSkip to conversation

memory: fix flatview_access_valid RCU read lock/unlock imbalance

PATCH Applied Paolo Bonzini 4 participants 4 messages Mar 7, 2018 – Mar 9, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memory: fix flatview_access_valid RCU read lock/unlock imbalance

Fixes 11e732a5ed46903f997985bed4c3767ca28a7eb6
---
 exec.c | 1 -
 1 file changed, 1 deletion(-)
exec.c +0 -1
index 604f03c535..a9181e6417 100644
@@ -3393,7 +3393,6 @@ static bool flatview_access_valid(FlatView *fv, hwaddr addr, int len,
         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.14.3
Tested-by on v1 1/1
#1 lore raw
Quoted 13 lines · On Wed, 7 Mar 2018 14:02:38 +0100 Paolo Bonzini <[email protected]> wrote:
Fixes 11e732a5ed46903f997985bed4c3767ca28a7eb6
---
 exec.c | 1 -
 1 file changed, 1 deletion(-)
exec.c +0 -0
index 604f03c535..a9181e6417 100644

exec.c static bool flatview_access_valid(FlatView *fv, hwaddr addr, int len, · line 3398

Quoted 7 lines
exec.c +0 -1
@@ -3393,7 +3393,6 @@ static bool flatview_access_valid(FlatView *fv, hwaddr addr, int len,
         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, that fixes master for me.

Tested-by on v1 1/1
#2 lore raw
In reply to Paolo Bonzini
Quoted 14 lines · Paolo Bonzini
Fixes 11e732a5ed46903f997985bed4c3767ca28a7eb6
---
 exec.c | 1 -
 1 file changed, 1 deletion(-)
exec.c +0 -0
index 604f03c535..a9181e6417 100644

exec.c static bool flatview_access_valid(FlatView *fv, hwaddr addr, int len, · line 3398

Quoted 7 lines
exec.c +0 -1
@@ -3393,7 +3393,6 @@ static bool flatview_access_valid(FlatView *fv, hwaddr addr, int len,
         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, this seems to fix the problem with the sam640ex and 40p machines.

#3 lore raw
Quoted 25 lines · Thomas Huth
Quoted 14 lines · Paolo Bonzini
Fixes 11e732a5ed46903f997985bed4c3767ca28a7eb6
---
 exec.c | 1 -
 1 file changed, 1 deletion(-)
exec.c +0 -0
index 604f03c535..a9181e6417 100644

exec.c static bool flatview_access_valid(FlatView *fv, hwaddr addr, int len, · line 3398

Quoted 7 lines
exec.c +0 -1
@@ -3393,7 +3393,6 @@ static bool flatview_access_valid(FlatView *fv, hwaddr addr, int len,
         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, this seems to fix the problem with the sam640ex and 40p machines.

Quoted 1 line

Thanks, applied to master since I ran into this too.

-- PMM