[PATCH] seccomp: Fix setting number of loaded filters

From: Wiktor Garbacz
Date: Tue Aug 10 2021 - 08:52:12 EST


The value is only reported through procfs so this
is purely cosmetic.

Signed-off-by: Wiktor Garbacz <wiktorg@xxxxxxxxxx>
---
kernel/seccomp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index 057e17f3215d..6469eca8078c 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -602,7 +602,7 @@ static inline void seccomp_sync_threads(unsigned long flags)
smp_store_release(&thread->seccomp.filter,
caller->seccomp.filter);
atomic_set(&thread->seccomp.filter_count,
- atomic_read(&thread->seccomp.filter_count));
+ atomic_read(&caller->seccomp.filter_count));

/*
* Don't let an unprivileged task work around
--
2.32.0.605.g8dce9f2422-goog