summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorKenta.Tada@sony.com <Kenta.Tada@sony.com>2021-03-21 15:52:19 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-14 09:50:24 +0200
commit7456cc7c9fd5e551f462287b0d105e8cd1ffc9ec (patch)
tree0e69b170a822d54b208cddd363b01065ce2a12dd /init
parent4f53ef0f7841b015c39698590b39fc98b209cbbc (diff)
downloadlinux-stable-7456cc7c9fd5e551f462287b0d105e8cd1ffc9ec.tar.gz
linux-stable-7456cc7c9fd5e551f462287b0d105e8cd1ffc9ec.tar.bz2
linux-stable-7456cc7c9fd5e551f462287b0d105e8cd1ffc9ec.zip
seccomp: Fix CONFIG tests for Seccomp_filters
[ Upstream commit 64bdc0244054f7d4bb621c8b4455e292f4e421bc ] Strictly speaking, seccomp filters are only used when CONFIG_SECCOMP_FILTER. This patch fixes the condition to enable "Seccomp_filters" in /proc/$pid/status. Signed-off-by: Kenta Tada <Kenta.Tada@sony.com> Fixes: c818c03b661c ("seccomp: Report number of loaded filters in /proc/$pid/status") Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/OSBPR01MB26772D245E2CF4F26B76A989F5669@OSBPR01MB2677.jpnprd01.prod.outlook.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'init')
-rw-r--r--init/init_task.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/init_task.c b/init/init_task.c
index 16d14c2ebb55..5fa18ed59d33 100644
--- a/init/init_task.c
+++ b/init/init_task.c
@@ -210,7 +210,7 @@ struct task_struct init_task
#ifdef CONFIG_SECURITY
.security = NULL,
#endif
-#ifdef CONFIG_SECCOMP
+#ifdef CONFIG_SECCOMP_FILTER
.seccomp = { .filter_count = ATOMIC_INIT(0) },
#endif
};