From: Andres Lagar-Cavilla Date: Mon, 17 Sep 2012 16:51:57 +0000 (+0100) Subject: Extra check in grant table code for mapping of shared frame X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7887 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3208d778be3a3a8a021e7eced3d24aa1eefe9c74;p=xen.git Extra check in grant table code for mapping of shared frame Signed-off-by: Andres Lagar-Cavilla Committed-by: Keir Fraser --- diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index c23c053db6..c8e342b554 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -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 )