函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\cgroup.c Create Date:2022-07-27 14:45:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:group_bpf_inherit() - inherit effective programs from parent*@cgrp: the cgroup to modify

函数原型:int cgroup_bpf_inherit(struct cgroup *cgrp)

返回类型:int

参数:

类型参数名称
struct cgroup *cgrp
204  struct bpf_prog_array * arrays[( 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  如果ret则返回:ret
213 p循环cgroup_bpf_get(p)
216 i小于has to use marco instead of const int, since compiler thinks* that array below is variable length循环初始化链表头
219 i小于has to use marco instead of const int, since compiler thinks* that array below is variable length循环如果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
221  转到:cleanup
223 i小于has to use marco instead of const int, since compiler thinks* that array below is variable length循环activate_effective_progs(cgrp, i, arrays[i])
226  返回:0
227  cleanup :
228 i小于has to use marco instead of const int, since compiler thinks* that array below is variable length循环bpf_prog_array_free(arrays[i])
231  percpu_ref_exit - undo percpu_ref_init()*@ref: percpu_ref to exit* This function exits @ref
233  返回:负ENOMEM
调用者
名称描述
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.
cgroup_setup_root