diff options
Diffstat (limited to 'kernel/bpf/cgroup.c')
| -rw-r--r-- | kernel/bpf/cgroup.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c index a3eaf08e7dd3..4fb20ab179fe 100644 --- a/kernel/bpf/cgroup.c +++ b/kernel/bpf/cgroup.c @@ -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  	 */ @@ -1341,7 +1341,7 @@ static u32 sysctl_convert_ctx_access(enum bpf_access_type type,  		*insn++ = BPF_LDX_MEM(  			BPF_SIZE(si->code), si->dst_reg, si->src_reg,  			bpf_target_off(struct bpf_sysctl_kern, write, -				       FIELD_SIZEOF(struct bpf_sysctl_kern, +				       sizeof_field(struct bpf_sysctl_kern,  						    write),  				       target_size));  		break;  |