]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
bpf: cgroup: annotate pointers in struct cgroup_bpf with __rcu
authorDaniel Mack <daniel@zonque.org>
Thu, 15 Dec 2016 09:53:21 +0000 (10:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Dec 2016 16:14:25 +0000 (11:14 -0500)
The member 'effective' in 'struct cgroup_bpf' is protected by RCU.
Annotate it accordingly to squelch a sparse warning.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bpf-cgroup.h

index 7b6e5d168c956063c37f614e2fe2f243435700db..92bc89ae7e20733c28f6130cf00314a42aa0c580 100644 (file)
@@ -20,7 +20,7 @@ struct cgroup_bpf {
         * when this cgroup is accessed.
         */
        struct bpf_prog *prog[MAX_BPF_ATTACH_TYPE];
-       struct bpf_prog *effective[MAX_BPF_ATTACH_TYPE];
+       struct bpf_prog __rcu *effective[MAX_BPF_ATTACH_TYPE];
 };
 
 void cgroup_bpf_put(struct cgroup *cgrp);