Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / kernel / bpf / cgroup.c
index a3eaf08e7dd3a843e697583e03e474aec7199ac1..9f90d3c92bdaca011f5645aa326fab4b09166d70 100644 (file)
@@ -180,8 +180,8 @@ static void activate_effective_progs(struct cgroup *cgrp,
                                     enum bpf_attach_type type,
                                     struct bpf_prog_array *old_array)
 {
-       rcu_swap_protected(cgrp->bpf.effective[type], old_array,
-                          lockdep_is_held(&cgroup_mutex));
+       old_array = rcu_replace_pointer(cgrp->bpf.effective[type], old_array,
+                                       lockdep_is_held(&cgroup_mutex));
        /* free prog array after grace period, since __cgroup_bpf_run_*()
         * might be still walking the array
         */