All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] seccomp: Add missing return in non-void function
@ 2021-01-11 17:28 Paul Cercueil
  2021-01-11 20:04 ` Kees Cook
  2021-01-11 20:06 ` Kees Cook
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Cercueil @ 2021-01-11 17:28 UTC (permalink / raw)
  To: Kees Cook, Andy Lutomirski, Will Drewry
  Cc: linux-kernel, Paul Cercueil, stable

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>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-11 20:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 17:28 [PATCH] seccomp: Add missing return in non-void function Paul Cercueil
2021-01-11 20:04 ` Kees Cook
2021-01-11 20:11   ` Paul Cercueil
2021-01-11 20:06 ` Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.