aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2015-05-28 18:44:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-28 21:25:18 -0400
commit2b1d3ae940acd11be44c6eced5873d47c2e00ffa (patch)
treedbf9ce6520a67e4277552ef1255581a7b76d139a
parent649b8de2f75145bf14cb1783688e16d51ac9b89a (diff)
fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings
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>
-rw-r--r--fs/binfmt_elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 241ef68d2893..cd46e4158830 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -918,7 +918,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
918 total_size = total_mapping_size(elf_phdata, 918 total_size = total_mapping_size(elf_phdata,
919 loc->elf_ex.e_phnum); 919 loc->elf_ex.e_phnum);
920 if (!total_size) { 920 if (!total_size) {
921 error = -EINVAL; 921 retval = -EINVAL;
922 goto out_free_dentry; 922 goto out_free_dentry;
923 } 923 }
924 } 924 }