Extra check in grant table code for mapping of shared frame

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Committed-by: Keir Fraser <keir@xen.org>
This commit is contained in:
Andres Lagar-Cavilla committed 2012-09-17 17:51:57 +01:00
1 parent 42d1b5413a
commit 3208d778be
1 file changed
+6 -3
+6 -3
View File
@@ -708,9 +708,12 @@ __gnttab_map_grant_ref(
}
else if ( owner == rd || owner == dom_cow )
{
if ( gnttab_host_mapping_get_page_type(op, ld, rd) &&
!get_page_type(pg, PGT_writable_page) )
goto could_not_pin;
if ( gnttab_host_mapping_get_page_type(op, ld, rd) )
{
if ( (owner == dom_cow) ||
!get_page_type(pg, PGT_writable_page) )
goto could_not_pin;
}
nr_gets++;
if ( op->flags & GNTMAP_host_map )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.