Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:group_bpf_release() - put references of all bpf programs and* release all cgroup bpf data*@work: work structure embedded into the cgroup to modify

Proto:static void cgroup_bpf_release(struct work_struct *work)

Type:void

Parameter:

TypeParameterName
struct work_struct *work
38  cgrp = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(work, structcgroup, release_work)
44  mutex_lock( & cgroup_mutex is the master lock)
46  When type < ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized( attached progs to this cgroup and attach flags * when flags == 0 or BPF_F_ALLOW_OVERRIDE the progs list will * have either zero or one element * when BPF_F_ALLOW_MULTI the list can have up to BPF_CGROUP_MAX_PROGS) cycle
47  progs = attached progs to this cgroup and attach flags * when flags == 0 or BPF_F_ALLOW_OVERRIDE the progs list will * have either zero or one element * when BPF_F_ALLOW_MULTI the list can have up to BPF_CGROUP_MAX_PROGS[type]
51  deletes entry from list
52  bpf_prog_put(prog)
54  bpf_cgroup_storage_unlink(storage[stype])
55  bpf_cgroup_storage_free(storage[stype])
57  kfree(pl)
58  static_branch_dec( & cgroup_bpf_enabled_key)
60  old_array = cu_dereference_protected() - fetch RCU pointer when updates prevented*@p: The pointer to read, prior to dereferencing*@c: The conditions under which the dereference will take place* Return the value of the specified RCU-protected pointer, but omit( array of effective progs in this cgroup [type], lockdep_is_held( & cgroup_mutex is the master lock))
63  bpf_prog_array_free(old_array)
66  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
68  When p cycle cgroup_bpf_put(p)
71  percpu_ref_exit - undo percpu_ref_init()*@ref: percpu_ref to exit* This function exits @ref
72  cgroup_put(cgrp)