Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Paul Cercueil <paul@crapouillou.net>
Cc: Andy Lutomirski <luto@amacapital.net>,
	Will Drewry <wad@chromium.org>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] seccomp: Add missing return in non-void function
Date: Mon, 11 Jan 2021 12:04:54 -0800	[thread overview]
Message-ID: <202101111204.971BDEC@keescook> (raw)
In-Reply-To: <20210111172839.640914-1-paul@crapouillou.net>

On Mon, Jan 11, 2021 at 05:28:39PM +0000, Paul Cercueil wrote:
> We don't actually care about the value, since the kernel will panic
> before that; but a value should nonetheless be returned, otherwise the
> compiler will complain.
> 
> Fixes: 8112c4f140fa ("seccomp: remove 2-phase API")
> Cc: stable@vger.kernel.org # 4.7+
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>

Ah, yes, thanks. What was the build config where this actually got
exposed?

> ---
>  kernel/seccomp.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/seccomp.c b/kernel/seccomp.c
> index 952dc1c90229..63b40d12896b 100644
> --- a/kernel/seccomp.c
> +++ b/kernel/seccomp.c
> @@ -1284,6 +1284,8 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
>  			    const bool recheck_after_trace)
>  {
>  	BUG();
> +
> +	return -1;
>  }
>  #endif
>  
> -- 
> 2.29.2
> 

-- 
Kees Cook

  reply	other threads:[~2021-01-11 20:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 17:28 [PATCH] seccomp: Add missing return in non-void function Paul Cercueil
2021-01-11 20:04 ` Kees Cook [this message]
2021-01-11 20:11   ` Paul Cercueil
2021-01-11 20:06 ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202101111204.971BDEC@keescook \
    --to=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=paul@crapouillou.net \
    --cc=stable@vger.kernel.org \
    --cc=wad@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox