From: Jan Beulich Date: Sun, 26 Feb 2006 03:18:25 +0000 (+0100) Subject: [PATCH] x86_64: fix USER_PTRS_PER_PGD X-Git-Tag: v2.6.16-rc5~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f83f2b5fbab4585f4de4523c7879d60e3f85a248;p=linux-2.6-omap-h63xx.git [PATCH] x86_64: fix USER_PTRS_PER_PGD The value, while currently unused in the native kernel, was off by one. Signed-Off-By: Jan Beulich Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 8fbf4dd7211..715fd94cf57 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h @@ -131,7 +131,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long #define PGDIR_SIZE (1UL << PGDIR_SHIFT) #define PGDIR_MASK (~(PGDIR_SIZE-1)) -#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) +#define USER_PTRS_PER_PGD ((TASK_SIZE-1)/PGDIR_SIZE+1) #define FIRST_USER_ADDRESS 0 #ifndef __ASSEMBLY__