]> nv-tegra.nvidia Code Review - linux-3.10.git/blobdiff - fs/exec.c
Merge branch 'master' into next
[linux-3.10.git] / fs / exec.c
index d164342c2b69b8e5b6c30bbf367c2b22eb4fe3a2..c0c636e34f60f5b347407f1c43599e088d7fedca 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -623,10 +623,8 @@ int setup_arg_pages(struct linux_binprm *bprm,
        /* Move stack pages down in memory. */
        if (stack_shift) {
                ret = shift_arg_pages(vma, stack_shift);
-               if (ret) {
-                       up_write(&mm->mmap_sem);
-                       return ret;
-               }
+               if (ret)
+                       goto out_unlock;
        }
 
 #ifdef CONFIG_STACK_GROWSUP
@@ -640,7 +638,7 @@ int setup_arg_pages(struct linux_binprm *bprm,
 
 out_unlock:
        up_write(&mm->mmap_sem);
-       return 0;
+       return ret;
 }
 EXPORT_SYMBOL(setup_arg_pages);