Skip to content

Commit

Permalink
fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mapp…
Browse files Browse the repository at this point in the history
…ings

commit 2b1d3ae upstream.

load_elf_binary() returns `retval', not `error'.

Fixes: a87938b ("fs/binfmt_elf.c: fix bug in loading of PIE binaries")
Reported-by: James Hogan <james.hogan@imgtec.com>
Cc: Michael Davidson <md@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Andrew Morton authored and Greg Kroah-Hartman committed Jun 6, 2015
1 parent fe023f7 commit f0d445d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
total_size = total_mapping_size(elf_phdata,
loc->elf_ex.e_phnum);
if (!total_size) {
error = -EINVAL;
retval = -EINVAL;
goto out_free_dentry;
}
}
Expand Down

0 comments on commit f0d445d

Please sign in to comment.