Revert "bpf/cgroup: Replace rcu_swap_protected() with rcu_replace_pointer()"

This reverts commit 41c91d0251017135e3ea9cdf5909449546862a0d.
This commit is contained in:
Zhiping du 2021-10-13 22:14:15 +08:00 committed by Menglong Dong
parent 8dc5dc303a
commit 538170d53c
1 changed files with 2 additions and 2 deletions

View File

@ -183,8 +183,8 @@ static void activate_effective_progs(struct cgroup *cgrp,
enum bpf_attach_type type,
struct bpf_prog_array *old_array)
{
old_array = rcu_replace_pointer(cgrp->bpf.effective[type], old_array,
lockdep_is_held(&cgroup_mutex));
rcu_swap_protected(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
*/