Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\cgroup.c Create Date:2022-07-28 13:27:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:group_bpf_inherit() - inherit effective programs from parent*@cgrp: the cgroup to modify

Proto:int cgroup_bpf_inherit(struct cgroup *cgrp)

Type:int

Parameter:

TypeParameterName
struct cgroup *cgrp
204  struct bpf_prog_array * arrays[( size of array of effective progs in this cgroup / sizeof(( array of effective progs in this cgroup )[0]) + ((int)(sizeof(struct{int : ( - !!(__builtin_types_compatible_p(typeof(( array of effective progs in this cgroup )), typeof( & ( array of effective progs in this cgroup )[0]))));}))))] = {}
208  ret = percpu_ref_init - initialize a percpu refcount*@ref: percpu_ref to initialize*@release: function which will be called when refcount hits 0*@flags: PERCPU_REF_INIT_* flags*@gfp: allocation mask to use* Initializes @ref
210  If ret Then Return ret
213  When p cycle cgroup_bpf_get(p)
216  When i < has to use marco instead of const int, since compiler thinks* that array below is variable length cycle Initialization list head
219  When i < has to use marco instead of const int, since compiler thinks* that array below is variable length cycle If mpute a chain of effective programs for a given cgroup:* start from the list of programs in this cgroup and add* all parent programs.* Note that parent's F_ALLOW_OVERRIDE-type program is yielding* to programs in this cgroup Then
221  Go to cleanup
223  When i < has to use marco instead of const int, since compiler thinks* that array below is variable length cycle activate_effective_progs(cgrp, i, arrays[i])
226  Return 0
227  cleanup :
228  When i < has to use marco instead of const int, since compiler thinks* that array below is variable length cycle bpf_prog_array_free(arrays[i])
231  percpu_ref_exit - undo percpu_ref_init()*@ref: percpu_ref to exit* This function exits @ref
233  Return -ENOMEM
Caller
NameDescribe
cgroup_createThe returned cgroup is fully initialized including its control mask, but* it isn't associated with its kernfs_node and doesn't have the control* mask applied.