diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2011-11-22 13:29:01 +0000 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2011-11-22 13:29:01 +0000 |
commit | e7e7a8626797ff675113a2f3623680ee56871212 (patch) | |
tree | 66a96f395f84f5a955f885e73284c2659ed3bb28 /xen/xsm | |
parent | 9c46139de889bc77571fe5ee7f000927d4aff24e (diff) | |
download | xen-e7e7a8626797ff675113a2f3623680ee56871212.tar.gz xen-e7e7a8626797ff675113a2f3623680ee56871212.tar.bz2 xen-e7e7a8626797ff675113a2f3623680ee56871212.zip |
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@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/xsm')
-rw-r--r-- | 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 e70feda5a4..a17f02ab78 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); |