diff options
Diffstat (limited to 'fs/binfmt_flat.c')
-rw-r--r-- | fs/binfmt_flat.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 0498b181dd52..3b40d45a3a16 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c | |||
@@ -531,7 +531,8 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
531 | DBG_FLT("BINFMT_FLAT: ROM mapping of file (we hope)\n"); | 531 | DBG_FLT("BINFMT_FLAT: ROM mapping of file (we hope)\n"); |
532 | 532 | ||
533 | down_write(¤t->mm->mmap_sem); | 533 | down_write(¤t->mm->mmap_sem); |
534 | textpos = do_mmap(bprm->file, 0, text_len, PROT_READ|PROT_EXEC, MAP_PRIVATE, 0); | 534 | textpos = do_mmap(bprm->file, 0, text_len, PROT_READ|PROT_EXEC, |
535 | MAP_PRIVATE|MAP_EXECUTABLE, 0); | ||
535 | up_write(¤t->mm->mmap_sem); | 536 | up_write(¤t->mm->mmap_sem); |
536 | if (!textpos || textpos >= (unsigned long) -4096) { | 537 | if (!textpos || textpos >= (unsigned long) -4096) { |
537 | if (!textpos) | 538 | if (!textpos) |
@@ -932,14 +933,8 @@ static int __init init_flat_binfmt(void) | |||
932 | return register_binfmt(&flat_format); | 933 | return register_binfmt(&flat_format); |
933 | } | 934 | } |
934 | 935 | ||
935 | static void __exit exit_flat_binfmt(void) | ||
936 | { | ||
937 | unregister_binfmt(&flat_format); | ||
938 | } | ||
939 | |||
940 | /****************************************************************************/ | 936 | /****************************************************************************/ |
941 | 937 | ||
942 | core_initcall(init_flat_binfmt); | 938 | core_initcall(init_flat_binfmt); |
943 | module_exit(exit_flat_binfmt); | ||
944 | 939 | ||
945 | /****************************************************************************/ | 940 | /****************************************************************************/ |