* [PATCH v2 0/1] fs/binfmt_elf_fdpic: fix error return code in load_elf_fdpic_binary()
@ 2021-07-15 7:41 Zhen Lei
2021-07-15 7:41 ` [PATCH v2 1/1] " Zhen Lei
0 siblings, 1 reply; 2+ messages in thread
From: Zhen Lei @ 2021-07-15 7:41 UTC (permalink / raw)
To: Alexander Viro, linux-fsdevel, linux-kernel; +Cc: Zhen Lei
v1 --> v2:
Update the commit message.
Zhen Lei (1):
fs/binfmt_elf_fdpic: fix error return code in load_elf_fdpic_binary()
fs/binfmt_elf_fdpic.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v2 1/1] fs/binfmt_elf_fdpic: fix error return code in load_elf_fdpic_binary()
2021-07-15 7:41 [PATCH v2 0/1] fs/binfmt_elf_fdpic: fix error return code in load_elf_fdpic_binary() Zhen Lei
@ 2021-07-15 7:41 ` Zhen Lei
0 siblings, 0 replies; 2+ messages in thread
From: Zhen Lei @ 2021-07-15 7:41 UTC (permalink / raw)
To: Alexander Viro, linux-fsdevel, linux-kernel; +Cc: Zhen Lei
When the call to create_elf_fdpic_tables() fails, the returned error code
should be propagated. However, we currently do not explicitly assign this
error code to 'retval'. As a result, 0 was incorrectly returned.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
fs/binfmt_elf_fdpic.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index cf4028487dcc..4efc1d6a5d22 100644
--- 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);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-15 7:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 7:41 [PATCH v2 0/1] fs/binfmt_elf_fdpic: fix error return code in load_elf_fdpic_binary() Zhen Lei
2021-07-15 7:41 ` [PATCH v2 1/1] " Zhen Lei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).