Linux-Fsdevel Archive on lore.kernel.org help / color / mirror / Atom feed
* [PATCH] fs: binfmt_em86: check return code of remove_arg_zero [not found] <55261f67-deb5-4089-5548-62bc091016ec@roeck-us.net> @ 2020-12-22 21:03 ` Nick Desaulniers 2021-01-06 2:57 ` Miguel Ojeda 0 siblings, 1 reply; 2+ messages in thread From: Nick Desaulniers @ 2020-12-22 21:03 UTC (permalink / raw) To: Alexander Viro Cc: Nick Desaulniers, Masahiro Yamada, Miguel Ojeda, Guenter Roeck, linux-fsdevel, linux-kernel remove_arg_zero is declared as __must_check. Looks like it can return -EFAULT on failure. Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> --- fs/binfmt_em86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c index 06b9b9fddf70..6e98fcfca66e 100644 --- a/fs/binfmt_em86.c +++ b/fs/binfmt_em86.c @@ -63,7 +63,8 @@ static int load_em86(struct linux_binprm *bprm) * This is done in reverse order, because of how the * user environment and arguments are stored. */ - remove_arg_zero(bprm); + retval = remove_arg_zero(bprm); + if (retval < 0) return retval; retval = copy_string_kernel(bprm->filename, bprm); if (retval < 0) return retval; bprm->argc++; -- 2.29.2.729.g45daf8777d-goog ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fs: binfmt_em86: check return code of remove_arg_zero 2020-12-22 21:03 ` [PATCH] fs: binfmt_em86: check return code of remove_arg_zero Nick Desaulniers @ 2021-01-06 2:57 ` Miguel Ojeda 0 siblings, 0 replies; 2+ messages in thread From: Miguel Ojeda @ 2021-01-06 2:57 UTC (permalink / raw) To: Nick Desaulniers Cc: Alexander Viro, Masahiro Yamada, Guenter Roeck, linux-fsdevel, linux-kernel, linux-alpha On Tue, Dec 22, 2020 at 10:03 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > > remove_arg_zero is declared as __must_check. Looks like it can return > -EFAULT on failure. > > Cc: Masahiro Yamada <masahiroy@kernel.org> > Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> > Reported-by: Guenter Roeck <linux@roeck-us.net> > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Cc'ing Alpha list too. Alexander, fs-devel: pinging about this... We removed ENABLE_MUST_CHECK in 196793946264 ("Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK"), so this should be giving a warning now unconditionally. In 5.12 it will likely become a build error. Nick: thanks for the patch! (I missed it in December, sorry) Reviewed-by: Miguel Ojeda <ojeda@kernel.org> Cheers, Miguel ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-06 2:59 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <55261f67-deb5-4089-5548-62bc091016ec@roeck-us.net> 2020-12-22 21:03 ` [PATCH] fs: binfmt_em86: check return code of remove_arg_zero Nick Desaulniers 2021-01-06 2:57 ` Miguel Ojeda
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).