patch-2.2.14 linux/mm/mmap.c

Next file: linux/mm/page_alloc.c
Previous file: linux/mm/memory.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.13/linux/mm/mmap.c linux/mm/mmap.c
@@ -186,7 +186,7 @@
 		return -EINVAL;
 
 	/* offset overflow? */
-	if (off + len < off)
+	if (off + len - 1 < off)
 		return -EINVAL;
 
 	/* Too many mappings? */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)