# From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
# 
# Fix of a wrong condition.
# 
# Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Index: linux-2.6.17/mm/memory.c
===================================================================
--- linux-2.6.17.orig/mm/memory.c	2007-11-19 10:40:59.000000000 -0500
+++ linux-2.6.17/mm/memory.c	2007-11-19 10:59:27.000000000 -0500
@@ -1000,7 +1000,7 @@ int get_user_pages(struct task_struct *t
 			pte_t *pte;
 			if (write) /* user gate pages are read-only */
 				return i ? : -EFAULT;
-			if (pg > TASK_SIZE)
+			if (pg >= TASK_SIZE)
 				pgd = pgd_offset_k(pg);
 			else
 				pgd = pgd_offset_gate(mm, pg);