mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] MAP_POPULATE prot 0
@ 2004-05-24 19:06 Hugh Dickins
  2004-05-24 21:13 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Hugh Dickins @ 2004-05-24 19:06 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

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 <hugh@veritas.com>

--- 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) {
 		up_write(&mm->mmap_sem);
-		sys_remap_file_pages(addr, len, prot,
+		sys_remap_file_pages(addr, len, 0,
 					pgoff, flags & MAP_NONBLOCK);
 		down_write(&mm->mmap_sem);
 	}


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-24 19:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-24 19:06 [PATCH] MAP_POPULATE prot 0 Hugh Dickins
2004-05-24 21:13 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®