seccomp: Fix setting loaded filter count during TSYNC
[linux-block.git] / kernel / seccomp.c
index 057e17f3215d5633fc18df103fae36702a63bba4..6469eca8078ca01eb3e0407d741964a25e88d2d1 100644 (file)
@@ -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