函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: number of elements in the list.* it's slow but the list cannot be long

函数原型:static u32 prog_list_length(struct list_head *head)

返回类型:u32

参数:

类型参数名称
struct list_head *head
94  cnt等于0
97  如果非prog则继续下一循环
99  cnt自加
101  返回:cnt
调用者
名称描述
hierarchy_allows_attach parent has non-overridable prog attached,* disallow attaching new programs to the descendent cgroup.* if parent has overridable or multi-prog, allow attaching
compute_effective_progsmpute 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
__cgroup_bpf_attach__cgroup_bpf_attach() - Attach the program to a cgroup, and* propagate the change to descendants*@cgrp: The cgroup which descendants to traverse*@prog: A program to attach*@type: Type of attach operation*@flags: Option flags
__cgroup_bpf_queryMust be called with cgroup_mutex held to avoid races.