[lkml]   [2004]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] MAP_POPULATE prot 0
It seems eccentric to implement MAP_POPULATE only on PROT_NONE mappings:
do_mmap_pgoff is passing down prot, then sys_remap_file_pages verifies
it's not set. I guess that's an oversight from when we realized that
the prot arg to sys_remap_file_pages was misdesigned.

There's another oddity whose heritage is harder for me to understand,
so please let me leave it to you: sys_remap_file_pages is declared as
asmlinkage in mm/fremap.c, but is the one syscall declared without
asmlinkage in include/linux/syscalls.h.

Signed-off-by: Hugh Dickins <>

--- 2.6.7-rc1/mm/mmap.c 2004-05-24 12:17:56.209179464 +0100
+++ linux/mm/mmap.c 2004-05-24 19:33:40.265678752 +0100
@@ -951,7 +951,7 @@ out:
if (flags & MAP_POPULATE) {
- sys_remap_file_pages(addr, len, prot,
+ sys_remap_file_pages(addr, len, 0,
pgoff, flags & MAP_NONBLOCK);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:03    [W:0.029 / U:33.272 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site