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

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

Fixes: a87938b ("fs/binfmt_elf.c: fix bug in loading of PIE binaries")
Reported-by: James Hogan <[email protected]>
Cc: Michael Davidson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed May 29, 2015
1 parent 649b8de commit 2b1d3ae
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 @@ -918,7 +918,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 2b1d3ae

Please sign in to comment.