* [PATCH] seccomp: Fix resetting filter count at seccomp_sync_threads()
@ 2021-03-04 23:37 Hsuan-Chi Kuo
2021-08-11 19:00 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Hsuan-Chi Kuo @ 2021-03-04 23:37 UTC (permalink / raw)
To: keescook; +Cc: hsuanchikuo, Andy Lutomirski, Will Drewry, linux-kernel
The desired behavior is to set the caller's filter count to thread's.
Signed-off-by: Hsuan-Chi Kuo <hsuanchikuo@gmail.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] seccomp: Fix resetting filter count at seccomp_sync_threads()
2021-03-04 23:37 [PATCH] seccomp: Fix resetting filter count at seccomp_sync_threads() Hsuan-Chi Kuo
@ 2021-08-11 19:00 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2021-08-11 19:00 UTC (permalink / raw)
To: Hsuan-Chi Kuo
Cc: Kees Cook, Will Drewry, linux-kernel, Andy Lutomirski, Wiktor Garbacz
On Thu, 4 Mar 2021 17:37:08 -0600, Hsuan-Chi Kuo wrote:
> The desired behavior is to set the caller's filter count to thread's.
Applied to for-next/seccomp, thanks!
[1/1] seccomp: Fix resetting filter count at seccomp_sync_threads()
https://git.kernel.org/kees/c/b4d8a58f8dcf
--
Kees Cook
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-11 19:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 23:37 [PATCH] seccomp: Fix resetting filter count at seccomp_sync_threads() Hsuan-Chi Kuo
2021-08-11 19:00 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).