[PATCH] freepgt: sys_mincore ignore FIRST_USER_PGD_NR
authorHugh Dickins <hugh@veritas.com>
Tue, 19 Apr 2005 20:29:20 +0000 (13:29 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org.(none)>
Tue, 19 Apr 2005 20:29:20 +0000 (13:29 -0700)
Remove use of FIRST_USER_PGD_NR from sys_mincore: it's inconsistent (no other
syscall refers to it), unnecessary (sys_mincore loops over vmas further down)
and incorrect (misses user addresses in ARM's first pgd).

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/mincore.c

index 07833dc5829df353b4d3cbab0c8c0af668b4f7d7..72890780c1c94f0d89740ac5942fbdaa3dbae01b 100644 (file)
@@ -118,9 +118,6 @@ asmlinkage long sys_mincore(unsigned long start, size_t len,
        if (start & ~PAGE_CACHE_MASK)
                goto einval;
 
-       if (start < FIRST_USER_PGD_NR * PGDIR_SIZE)
-               goto enomem;
-
        limit = TASK_SIZE;
        if (start >= limit)
                goto enomem;