summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2021-01-11 17:28:39 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-03 17:44:43 +0100
commite2e1857a87e394466aea1c631c80b8bd42b7eef5 (patch)
tree48ececd61b6a4a157e29a0fb74da5914a19ff726
parent5fdd05dc81b0f4a5dfddc494cb48333d95cb0f6a (diff)
downloadlinux-stable-e2e1857a87e394466aea1c631c80b8bd42b7eef5.tar.gz
linux-stable-e2e1857a87e394466aea1c631c80b8bd42b7eef5.tar.bz2
linux-stable-e2e1857a87e394466aea1c631c80b8bd42b7eef5.zip
seccomp: Add missing return in non-void function
commit 04b38d012556199ba4c31195940160e0c44c64f0 upstream. 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> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20210111172839.640914-1-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--kernel/seccomp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index 3975856d476c..ac56ebffeb95 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -669,6 +669,8 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
const bool recheck_after_trace)
{
BUG();
+
+ return -1;
}
#endif