diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2015-05-28 15:44:24 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-05 23:20:00 -0700 |
commit | f0d445db03594ec6658c5fee64099e181f5ce570 (patch) | |
tree | 8b26268ba1a595807babc1dca506c644066d060d /fs | |
parent | fe023f735b36f809b4d740e86f15658a2852fc09 (diff) |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 53f620a4350e..618bcc84a09e 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -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; } } |