Re: [PATCH v9 09/11] seccomp: introduce writer locking

From
Oleg Nesterov <oleg@redhat.com>
Date
2014-07-09 19:01:36
Also in
linux-arch, linux-arm-kernel, linux-mips, lkml
Reply to
Kees Cook, 2014-06-27
On 06/27, Kees Cook wrote:
quoted hunk ↗ jump to hunk

 void put_seccomp_filter(struct task_struct *tsk)
 {
-	struct seccomp_filter *orig = tsk->seccomp.filter;
+	struct seccomp_filter *orig = smp_load_acquire(&tsk->seccomp.filter);
 	/* Clean up single-reference branches iteratively. */
 	while (orig && atomic_dec_and_test(&orig->usage)) {
And this smp_load_acquire() looks unnecessary. atomic_dec_and_test()
is a barrier.

Oleg.
Thread (23 messages) 23 messages, 2 authors, last reply 2014-07-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help