Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210550
b: refs/heads/master
c: 1b52818
h: refs/heads/master
v: v3
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Sep 10, 2010
1 parent 5ead537 commit 2bcd5c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be6200aac985e0a3db56ec636763a32f3e32e7f1
refs/heads/master: 1b528181b2ffa14721fb28ad1bd539fe1732c583
5 changes: 5 additions & 0 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,11 @@ int setup_arg_pages(struct linux_binprm *bprm,
#else
stack_top = arch_align_stack(stack_top);
stack_top = PAGE_ALIGN(stack_top);

if (unlikely(stack_top < mmap_min_addr) ||
unlikely(vma->vm_end - vma->vm_start >= stack_top - mmap_min_addr))
return -ENOMEM;

stack_shift = vma->vm_end - stack_top;

bprm->p -= stack_shift;
Expand Down

0 comments on commit 2bcd5c3

Please sign in to comment.