From: Keir Fraser Date: Thu, 6 Dec 2007 10:43:24 +0000 (+0000) Subject: Changed vm_normal_page to return NULL when presented with a VMA marked X-Git-Tag: xen-3.2.0~21^2^2~28^2^2~18 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=95facbc26dc16bc6c815908977b7d37fbef41c1c;p=xenclient%2Fkernel.git Changed vm_normal_page to return NULL when presented with a VMA marked as being VM_FOREIGN. Signed-off-by: Derek Murray --- diff --git a/mm/memory.c b/mm/memory.c index 92aabca9..ceb0d351 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -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