]> xenbits.xensource.com Git - people/ssmith/netchannel2-pvops.git/commitdiff
After a page has been copy map-broken, it's still considered foreign
authorSteven Smith <ssmith@weybridge.uk.xensource.com>
Thu, 16 Apr 2009 13:10:14 +0000 (14:10 +0100)
committerSteven Smith <ssmith@weybridge.uk.xensource.com>
Tue, 19 May 2009 14:04:12 +0000 (15:04 +0100)
from the point of view of PageForeign(), even though there aren't really
any grant references backing it.  Make sure we don't try to do a grant-to-grant
copy on it.

drivers/xen/netback/netback.c

index f8ad1bac399f0e1405793f23b785a5090a7ad254..64a015ed169f5b8cefc421241b22283371fe3933 100644 (file)
@@ -303,7 +303,7 @@ static u16 netbk_gop_frag(struct xen_netif *netif, struct netbk_rx_meta *meta,
 
        copy_gop = npo->copy + npo->copy_prod++;
        copy_gop->flags = GNTCOPY_dest_gref;
-       if (PageForeign(page)) {
+       if (PageForeign(page) && page->mapping != NULL) {
                lookup_tracker_page(page, &copy_gop->source.domid,
                                    &copy_gop->source.u.ref);
                copy_gop->flags |= GNTCOPY_source_gref;