summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-09 16:22:26 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-09 16:22:26 -0800
commite4da7e9a54649d6877ac23828ff93ce7191eae2c (patch)
tree8da364f62ed721a02eab0f638bf0ffd78c3b2756
parent50c36504fc6090847f1fbdc7cf4852ae16d6e500 (diff)
parent4ac313111018cb44ecc250445de5ccb93026a980 (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu/coldfire fix from Greg Ungerer: "Only a single patch, fixes brk area setup problem in nommu environments" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: fs/binfmt_elf_fdpic.c: fix brk area overlap with stack on NOMMU
-rw-r--r--fs/binfmt_elf_fdpic.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index d3634bfb7fe1..d2b079afed0e 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -374,10 +374,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm)
PAGE_ALIGN(current->mm->start_brk);
#else
- /* create a stack and brk area big enough for everyone
- * - the brk heap starts at the bottom and works up
- * - the stack starts at the top and works down
- */
+ /* create a stack area and zero-size brk area */
stack_size = (stack_size + PAGE_SIZE - 1) & PAGE_MASK;
if (stack_size < PAGE_SIZE * 2)
stack_size = PAGE_SIZE * 2;
@@ -400,8 +397,6 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm)
current->mm->brk = current->mm->start_brk;
current->mm->context.end_brk = current->mm->start_brk;
- current->mm->context.end_brk +=
- (stack_size > PAGE_SIZE) ? (stack_size - PAGE_SIZE) : 0;
current->mm->start_stack = current->mm->start_brk + stack_size;
#endif