Skip to contentSkip to conversation

grant: Release domain lock on 'map' path in cache_flush

PATCH New George Dunlap 1 participant 1 message Feb 22, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 grant: Release domain lock on 'map' path in cache_flush

common/grant_table.c:cache_flush() grabs the rcu lock for the current domain, but only releases it on error paths.

Note that this is not a security issue, as the preempt count is used exclusively for assertions at the moment.

---
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
CC: Andrew Cooper <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Tim Deegan <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Konrad Wilk <[email protected]>

---
 xen/common/grant_table.c | 1 +
 1 file changed, 1 insertion(+)
xen/common/grant_table.c +1 -0
index 48c547930c..8346994de6 100644
@@ -3273,6 +3273,7 @@ static int cache_flush(const gnttab_cache_flush_t *cflush, grant_ref_t *cur_ref)
 
     unmap_domain_page(v);
     put_page(page);
+    rcu_unlock_domain(d);
 
     return ret;
 }
Signature · 7 lines
2.15.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel