Merge remote-tracking branch 'lsk/v3.10/topic/gicv3' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / fs / exec.c
index bb60cda5ee30765a171f373537212134d979f139..dd6aa61c85486b74ce70ae802966dc85814c8317 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -654,10 +654,10 @@ int setup_arg_pages(struct linux_binprm *bprm,
        unsigned long rlim_stack;
 
 #ifdef CONFIG_STACK_GROWSUP
-       /* Limit stack size to 1GB */
+       /* Limit stack size */
        stack_base = rlimit_max(RLIMIT_STACK);
-       if (stack_base > (1 << 30))
-               stack_base = 1 << 30;
+       if (stack_base > STACK_SIZE_MAX)
+               stack_base = STACK_SIZE_MAX;
 
        /* Make sure we didn't let the argument array grow too large. */
        if (vma->vm_end - vma->vm_start > stack_base)