Commit fc63cf23 authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

exec: setup_arg_pages() fails to return errors

In setup_arg_pages we work hard to assign a value to ret, but on exit we
always return 0.

Also remove a now duplicated exit path and branch to out_unlock instead.
Signed-off-by: default avatarAnton Blanchard <>
Acked-by: default avatarSerge Hallyn <>
Reviewed-by: default avatarWANG Cong <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 93f40e6f
......@@ -624,10 +624,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) {
return ret;
if (ret)
goto out_unlock;
......@@ -641,7 +639,7 @@ int setup_arg_pages(struct linux_binprm *bprm,
return 0;
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment