patch-2.3.4 linux/mm/mmap.c
Next file: linux/mm/slab.c
Previous file: linux/mm/memory.c
Back to the patch index
Back to the overall index
-  Lines: 10
-  Date:
Mon May 24 08:56:53 1999
-  Orig file: 
v2.3.3/linux/mm/mmap.c
-  Orig date: 
Tue May  4 15:44:38 1999
diff -u --recursive --new-file v2.3.3/linux/mm/mmap.c linux/mm/mmap.c
@@ -185,6 +185,9 @@
 	if (len > TASK_SIZE || addr > TASK_SIZE-len)
 		return -EINVAL;
 
+	if (off & ~PAGE_MASK)
+		return -EINVAL;
+
 	/* offset overflow? */
 	if (off + len < off)
 		return -EINVAL;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)