From: William Lee Irwin III <wli@holomorphy.com>

Using PAGE_SIZE rather than 4096 so that mmap() granularity is honored by
whatever non-i386 architectures use MMAP_PAGE_ZERO.


---

 25-akpm/fs/binfmt_elf.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN fs/binfmt_elf.c~elf-mmap-fix fs/binfmt_elf.c
--- 25/fs/binfmt_elf.c~elf-mmap-fix	Fri Mar  5 14:08:24 2004
+++ 25-akpm/fs/binfmt_elf.c	Fri Mar  5 14:08:24 2004
@@ -830,9 +830,8 @@ static int load_elf_binary(struct linux_
 		   and some applications "depend" upon this behavior.
 		   Since we do not have the power to recompile these, we
 		   emulate the SVr4 behavior.  Sigh.  */
-		/* N.B. Shouldn't the size here be PAGE_SIZE?? */
 		down_write(&current->mm->mmap_sem);
-		error = do_mmap(NULL, 0, 4096, PROT_READ | PROT_EXEC,
+		error = do_mmap(NULL, 0, PAGE_SIZE, PROT_READ | PROT_EXEC,
 				MAP_FIXED | MAP_PRIVATE, 0);
 		up_write(&current->mm->mmap_sem);
 	}

_