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

[Xen-changelog] [xen-unstable] xsm/flask: Use correct flag to detect writable grant mappings



# HG changeset patch
# User Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
# Date 1321968541 0
# Node ID 0db9c1fc8213013f48110cb19641a286140c0563
# Parent  2bc6c29b14a791e63e396f830e79adf790668d24
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>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 2bc6c29b14a7 -r 0db9c1fc8213 xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c     Tue Nov 22 13:27:19 2011 +0000
+++ b/xen/xsm/flask/hooks.c     Tue Nov 22 13:29:01 2011 +0000
@@ -279,7 +279,7 @@
 {
     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);

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


 


Rackspace

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