diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2015-05-28 15:44:24 -0700 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2015-08-07 00:32:13 +0100 |
commit | 74b469cfb9b8eca325bb5822708fda9c6dc3626a (patch) | |
tree | 60c1aa06af78c6d23e61dba65b3647d2225f9167 /fs | |
parent | a8f5259269671acb4f0bdb6e0a53974aa5b351ff (diff) | |
download | lwn-74b469cfb9b8eca325bb5822708fda9c6dc3626a.tar.gz lwn-74b469cfb9b8eca325bb5822708fda9c6dc3626a.zip |
fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings
commit 2b1d3ae940acd11be44c6eced5873d47c2e00ffa upstream.
load_elf_binary() returns `retval', not `error'.
Fixes: a87938b2e246b81b4fb ("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: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/binfmt_elf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index e314d982f504..d25246277869 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -813,7 +813,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) total_size = total_mapping_size(elf_phdata, loc->elf_ex.e_phnum); if (!total_size) { - error = -EINVAL; + retval = -EINVAL; goto out_free_dentry; } } |