]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
Changed vm_normal_page to return NULL when presented with a VMA marked
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 6 Dec 2007 10:43:24 +0000 (10:43 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 6 Dec 2007 10:43:24 +0000 (10:43 +0000)
as being VM_FOREIGN.

Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
mm/memory.c

index 92aabca9a6111ca023ed73676b327d1668cbae1c..ceb0d35147394e0b9a383c3be873578004df7ee7 100644 (file)
@@ -396,6 +396,10 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_
                        return NULL;
        }
 
+       /* XEN: Covers user-space grant mappings (even of local pages). */
+       if (unlikely(vma->vm_flags & VM_FOREIGN))
+               return NULL;
+
        /*
         * Add some anal sanity checks for now. Eventually,
         * we should just do "return pfn_to_page(pfn)", but