seccomp: Add missing return in non-void function
authorPaul Cercueil <paul@crapouillou.net>
Mon, 11 Jan 2021 17:28:39 +0000 (17:28 +0000)
committerKees Cook <keescook@chromium.org>
Mon, 11 Jan 2021 20:05:14 +0000 (12:05 -0800)
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
kernel/seccomp.c

index 952dc1c902295ffe65ce24541dac98ff4dccf8d9..63b40d12896bd61bd3e69a5bb1395d3d3c8ec748 100644 (file)
@@ -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