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

[Xen-devel] [PATCH] xsm/flask: Use correct flag to detect writable grant mappings



The flags passed to xsm_grant_mapref are the flags from the map
operation (GNTMAP_*), not status flags (GTF_*).

Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
---
 xen/xsm/flask/hooks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index e70feda..1cfa621 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -279,7 +279,7 @@ static int flask_grant_mapref(struct domain *d1, struct 
domain *d2,
 {
     u32 perms = GRANT__MAP_READ;
 
-    if ( flags & GTF_writing )
+    if (!( flags & GNTMAP_readonly))
         perms |= GRANT__MAP_WRITE;
 
     return domain_has_perm(d1, d2, SECCLASS_GRANT, perms);
-- 
1.7.7.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.