diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-05-20 01:30:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-05-20 01:30:34 -0400 |
commit | 41abc90228f98774263572ec99e7ab820f091002 (patch) | |
tree | ce41e35a000ae50780b3f09b5be5d46fe93bf2d2 /fs | |
parent | a7b0806392b527e8a616e7ea6f17aafe33949a9f (diff) | |
parent | ffe6902b66aaa4ca6694bc19639259c16d84ddb1 (diff) |
Merge tag 'metag-for-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag
Pull Metag architecture and related fixes from James Hogan:
"Mostly fixes for metag and parisc relating to upgrowing stacks.
- Fix missing compiler barriers in metag memory barriers.
- Fix BUG_ON on metag when RLIMIT_STACK hard limit is increased
beyond safe value.
- Make maximum stack size configurable. This reduces the default
user stack size back to 80MB (especially on parisc after their
removal of _STK_LIM_MAX override). This only affects metag and
parisc.
- Remove metag _STK_LIM_MAX override to match other arches and follow
parisc, now that it is safe to do so (due to the BUG_ON fix
mentioned above).
- Finally now that both metag and parisc _STK_LIM_MAX overrides have
been removed, it makes sense to remove _STK_LIM_MAX altogether"
* tag 'metag-for-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
asm-generic: remove _STK_LIM_MAX
metag: Remove _STK_LIM_MAX override
parisc,metag: Do not hardcode maximum userspace stack size
metag: Reduce maximum stack size to 256MB
metag: fix memory barriers
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exec.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -657,10 +657,10 @@ int setup_arg_pages(struct linux_binprm *bprm, | |||
657 | unsigned long rlim_stack; | 657 | unsigned long rlim_stack; |
658 | 658 | ||
659 | #ifdef CONFIG_STACK_GROWSUP | 659 | #ifdef CONFIG_STACK_GROWSUP |
660 | /* Limit stack size to 1GB */ | 660 | /* Limit stack size */ |
661 | stack_base = rlimit_max(RLIMIT_STACK); | 661 | stack_base = rlimit_max(RLIMIT_STACK); |
662 | if (stack_base > (1 << 30)) | 662 | if (stack_base > STACK_SIZE_MAX) |
663 | stack_base = 1 << 30; | 663 | stack_base = STACK_SIZE_MAX; |
664 | 664 | ||
665 | /* Make sure we didn't let the argument array grow too large. */ | 665 | /* Make sure we didn't let the argument array grow too large. */ |
666 | if (vma->vm_end - vma->vm_start > stack_base) | 666 | if (vma->vm_end - vma->vm_start > stack_base) |