projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd57e44
)
binfmt: Fix error return code in load_elf_fdpic_binary()
author
Wang Yufen
<wangyufen@huawei.com>
Fri, 2 Dec 2022 01:41:01 +0000
(09:41 +0800)
committer
Kees Cook
<keescook@chromium.org>
Fri, 2 Dec 2022 03:15:52 +0000
(19:15 -0800)
Fix to return a negative error code from create_elf_fdpic_tables()
instead of 0.
Fixes:
1da177e4c3f4
("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link:
https://lore.kernel.org/r/1669945261-30271-1-git-send-email-wangyufen@huawei.com
fs/binfmt_elf_fdpic.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/binfmt_elf_fdpic.c
b/fs/binfmt_elf_fdpic.c
index e90c1192dec6dbf632295b8961001ce4a7fc4c1c..096e3520a0b10659a7c113e0338b40ebc67bfeff 100644
(file)
--- a/
fs/binfmt_elf_fdpic.c
+++ b/
fs/binfmt_elf_fdpic.c
@@
-434,8
+434,9
@@
static int load_elf_fdpic_binary(struct linux_binprm *bprm)
current->mm->start_stack = current->mm->start_brk + stack_size;
#endif
- if (create_elf_fdpic_tables(bprm, current->mm,
- &exec_params, &interp_params) < 0)
+ retval = create_elf_fdpic_tables(bprm, current->mm, &exec_params,
+ &interp_params);
+ if (retval < 0)
goto error;
kdebug("- start_code %lx", current->mm->start_code);