diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2015-05-28 15:44:24 -0700 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2015-06-03 14:30:08 +0100 |
commit | f06ca7b48865e51bb1e5491621da558136f11d8a (patch) | |
tree | 904677dc21adbc5e68363949fc2b1732b7026160 | |
parent | ba55aba5bd7b051884e5ae85ada247f41695e262 (diff) | |
download | linux-stable-f06ca7b48865e51bb1e5491621da558136f11d8a.tar.gz linux-stable-f06ca7b48865e51bb1e5491621da558136f11d8a.tar.bz2 linux-stable-f06ca7b48865e51bb1e5491621da558136f11d8a.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: Luis Henriques <luis.henriques@canonical.com>
-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 44bdf7b200c3..c13a138c1016 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -820,7 +820,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; } } |