Lines Matching refs:progs
46 for (type = 0; type < ARRAY_SIZE(cgrp->bpf.progs); type++) { in cgroup_bpf_release()
47 struct list_head *progs = &cgrp->bpf.progs[type]; in cgroup_bpf_release() local
50 list_for_each_entry_safe(pl, tmp, progs, node) { in cgroup_bpf_release()
123 cnt = prog_list_length(&p->bpf.progs[type]); in hierarchy_allows_attach()
143 struct bpf_prog_array *progs; in compute_effective_progs() local
151 cnt += prog_list_length(&p->bpf.progs[type]); in compute_effective_progs()
155 progs = bpf_prog_array_alloc(cnt, GFP_KERNEL); in compute_effective_progs()
156 if (!progs) in compute_effective_progs()
166 list_for_each_entry(pl, &p->bpf.progs[type], node) { in compute_effective_progs()
170 progs->items[cnt].prog = pl->prog; in compute_effective_progs()
172 progs->items[cnt].cgroup_storage[stype] = in compute_effective_progs()
178 *array = progs; in compute_effective_progs()
217 INIT_LIST_HEAD(&cgrp->bpf.progs[i]); in cgroup_bpf_inherit()
304 struct list_head *progs = &cgrp->bpf.progs[type]; in __cgroup_bpf_attach() local
320 if (!list_empty(progs) && cgrp->bpf.flags[type] != flags) in __cgroup_bpf_attach()
327 if (prog_list_length(progs) >= BPF_CGROUP_MAX_PROGS) in __cgroup_bpf_attach()
341 list_for_each_entry(pl, progs, node) { in __cgroup_bpf_attach()
361 list_add_tail(&pl->node, progs); in __cgroup_bpf_attach()
363 if (list_empty(progs)) { in __cgroup_bpf_attach()
371 list_add_tail(&pl->node, progs); in __cgroup_bpf_attach()
373 pl = list_first_entry(progs, typeof(*pl), node); in __cgroup_bpf_attach()
433 struct list_head *progs = &cgrp->bpf.progs[type]; in __cgroup_bpf_detach() local
447 if (list_empty(progs)) in __cgroup_bpf_detach()
454 list_for_each_entry(pl, progs, node) { in __cgroup_bpf_detach()
470 pl = list_first_entry(progs, typeof(*pl), node); in __cgroup_bpf_detach()
486 if (list_empty(progs)) in __cgroup_bpf_detach()
506 struct list_head *progs = &cgrp->bpf.progs[type]; in __cgroup_bpf_query() local
517 cnt = prog_list_length(progs); in __cgroup_bpf_query()
538 list_for_each_entry(pl, progs, node) { in __cgroup_bpf_query()