[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210304233708.420597-1-hsuanchikuo@gmail.com>
Date: Thu, 4 Mar 2021 17:37:08 -0600
From: Hsuan-Chi Kuo <hsuanchikuo@...il.com>
To: keescook@...omium.org
Cc: hsuanchikuo@...il.com, Andy Lutomirski <luto@...capital.net>,
Will Drewry <wad@...omium.org>, linux-kernel@...r.kernel.org
Subject: [PATCH] seccomp: Fix resetting filter count at seccomp_sync_threads()
The desired behavior is to set the caller's filter count to thread's.
Signed-off-by: Hsuan-Chi Kuo <hsuanchikuo@...il.com>
---
kernel/seccomp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index 1d60fc2c99..3dde1aa173 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -597,7 +597,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.30.1
Powered by blists - more mailing lists