[PATCH] Fix vma argument in get_usr_pages() for gate areas
The system call gate area handling called vm_normal_page() with the
wrong vma (which was always NULL, and caused an oops).
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/mm/memory.c b/mm/memory.c
index 9ab206b..6c1eac9 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -988,7 +988,7 @@
return i ? : -EFAULT;
}
if (pages) {
- struct page *page = vm_normal_page(vma, start, *pte);
+ struct page *page = vm_normal_page(gate_vma, start, *pte);
pages[i] = page;
if (page)
get_page(page);