diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -623,10 +623,8 @@ int setup_arg_pages(struct linux_binprm *bprm, | |||
623 | /* Move stack pages down in memory. */ | 623 | /* Move stack pages down in memory. */ |
624 | if (stack_shift) { | 624 | if (stack_shift) { |
625 | ret = shift_arg_pages(vma, stack_shift); | 625 | ret = shift_arg_pages(vma, stack_shift); |
626 | if (ret) { | 626 | if (ret) |
627 | up_write(&mm->mmap_sem); | 627 | goto out_unlock; |
628 | return ret; | ||
629 | } | ||
630 | } | 628 | } |
631 | 629 | ||
632 | #ifdef CONFIG_STACK_GROWSUP | 630 | #ifdef CONFIG_STACK_GROWSUP |
@@ -640,7 +638,7 @@ int setup_arg_pages(struct linux_binprm *bprm, | |||
640 | 638 | ||
641 | out_unlock: | 639 | out_unlock: |
642 | up_write(&mm->mmap_sem); | 640 | up_write(&mm->mmap_sem); |
643 | return 0; | 641 | return ret; |
644 | } | 642 | } |
645 | EXPORT_SYMBOL(setup_arg_pages); | 643 | EXPORT_SYMBOL(setup_arg_pages); |
646 | 644 | ||