vm_normal_page can be called with a NULL vma. This can be replaced with gate_vma, and no problem because none of the gate vmas use VM_PFNMAP (if they did they would need to set vm_pgoff). Signed-off-by: Nick Piggin Index: linux-2.6/mm/memory.c =================================================================== --- linux-2.6.orig/mm/memory.c +++ linux-2.6/mm/memory.c @@ -988,7 +988,8 @@ int get_user_pages(struct task_struct *t return i ? : -EFAULT; } if (pages) { - struct page *page = vm_normal_page(vma, start, *pte); + struct page *page; + page = vm_normal_page(gate_vma, start, *pte); pages[i] = page; if (page) get_page(page);