patch-2.4.23 linux-2.4.23/mm/mmap.c
Next file: linux-2.4.23/mm/mprotect.c
Previous file: linux-2.4.23/mm/memory.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
2003-11-28 10:26:21.000000000 -0800
- Orig file:
linux-2.4.22/mm/mmap.c
- Orig date:
2003-06-13 07:51:39.000000000 -0700
diff -urN linux-2.4.22/mm/mmap.c linux-2.4.23/mm/mmap.c
@@ -69,7 +69,7 @@
return 1;
/* The page cache contains buffer pages these days.. */
- free = atomic_read(&page_cache_size);
+ free = page_cache_size;
free += nr_free_pages();
free += nr_swap_pages;
@@ -1041,6 +1041,9 @@
if (!len)
return addr;
+ if ((addr + len) > TASK_SIZE || (addr + len) < addr)
+ return -EINVAL;
+
/*
* mlock MCL_FUTURE?
*/
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)