mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04: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 <[email protected]>
Cc: Michael Davidson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
649b8de2f7
commit
2b1d3ae940
1 file changed
+1
-1
+1
-1
@@ -918,7 +918,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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user