[PATCH v9 09/11] seccomp: introduce writer locking
Oleg Nesterov
oleg at redhat.com
Wed Jul 9 11:59:36 PDT 2014
On 06/27, Kees Cook wrote:
>
> 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.
More information about the linux-arm-kernel
mailing list