tree d47aea7e40411d997392b1ce12cc82fd02908ec8
parent 03a002e783b71517a5203e681f84a2719e9cec0e
author Greg Ungerer <[EMAIL PROTECTED]> Fri, 02 Sep 2005 10:42:52 +1000
committer Linus Torvalds <[EMAIL PROTECTED]> Fri, 02 Sep 2005 14:57:31 -0700

[PATCH] uclinux: use MAP_PRIVATE when mmaping code regions in flat binary loader

Use MAP_PRIVATE when calling mmap to get memory for the code region.
The flat loader was using MAP_SHARED, but underlying changes to the
MMUless mmap means this is now wrong.

Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 fs/binfmt_flat.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -520,7 +520,7 @@ static int load_flat_file(struct linux_b
                DBG_FLT("BINFMT_FLAT: ROM mapping of file (we hope)\n");
 
                down_write(&current->mm->mmap_sem);
-               textpos = do_mmap(bprm->file, 0, text_len, PROT_READ|PROT_EXEC, 
MAP_SHARED, 0);
+               textpos = do_mmap(bprm->file, 0, text_len, PROT_READ|PROT_EXEC, 
MAP_PRIVATE, 0);
                up_write(&current->mm->mmap_sem);
                if (!textpos  || textpos >= (unsigned long) -4096) {
                        if (!textpos)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to