mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings
load_elf_binary() returns `retval', not `error'.
Fixes: a87938b2e2
("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>
This commit is contained in:
parent
649b8de2f7
commit
2b1d3ae940
@ -918,7 +918,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
|
|||||||
total_size = total_mapping_size(elf_phdata,
|
total_size = total_mapping_size(elf_phdata,
|
||||||
loc->elf_ex.e_phnum);
|
loc->elf_ex.e_phnum);
|
||||||
if (!total_size) {
|
if (!total_size) {
|
||||||
error = -EINVAL;
|
retval = -EINVAL;
|
||||||
goto out_free_dentry;
|
goto out_free_dentry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user