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()
120 cnt = prog_list_length(&p->bpf.progs[type]); in hierarchy_allows_attach()
140 struct bpf_prog_array *progs; in compute_effective_progs() local
148 cnt += prog_list_length(&p->bpf.progs[type]); in compute_effective_progs()
152 progs = bpf_prog_array_alloc(cnt, GFP_KERNEL); in compute_effective_progs()
153 if (!progs) in compute_effective_progs()
163 list_for_each_entry(pl, &p->bpf.progs[type], node) { in compute_effective_progs()
167 progs->items[cnt].prog = pl->prog; in compute_effective_progs()
169 progs->items[cnt].cgroup_storage[stype] = in compute_effective_progs()
175 *array = progs; in compute_effective_progs()
210 INIT_LIST_HEAD(&cgrp->bpf.progs[i]); in cgroup_bpf_inherit()
294 struct list_head *progs = &cgrp->bpf.progs[type]; in __cgroup_bpf_attach() local
310 if (!list_empty(progs) && cgrp->bpf.flags[type] != flags) in __cgroup_bpf_attach()
317 if (prog_list_length(progs) >= BPF_CGROUP_MAX_PROGS) in __cgroup_bpf_attach()
331 list_for_each_entry(pl, progs, node) { in __cgroup_bpf_attach()
351 list_add_tail(&pl->node, progs); in __cgroup_bpf_attach()
353 if (list_empty(progs)) { in __cgroup_bpf_attach()
361 list_add_tail(&pl->node, progs); in __cgroup_bpf_attach()
363 pl = list_first_entry(progs, typeof(*pl), node); in __cgroup_bpf_attach()
423 struct list_head *progs = &cgrp->bpf.progs[type]; in __cgroup_bpf_detach() local
437 if (list_empty(progs)) in __cgroup_bpf_detach()
444 list_for_each_entry(pl, progs, node) { in __cgroup_bpf_detach()
460 pl = list_first_entry(progs, typeof(*pl), node); in __cgroup_bpf_detach()
476 if (list_empty(progs)) in __cgroup_bpf_detach()
496 struct list_head *progs = &cgrp->bpf.progs[type]; in __cgroup_bpf_query() local
507 cnt = prog_list_length(progs); in __cgroup_bpf_query()
528 list_for_each_entry(pl, progs, node) { in __cgroup_bpf_query()