History

bpf/docs: Document struct cgroup * kfuncs

bpf_cgroup_acquire(), bpf_cgroup_release(), bpf_cgroup_kptr_get(), and bpf_cgroup_ancestor(), are kfuncs that were recently added to kernel/bpf/helpers.c. These are "core" kfuncs in that they're available for use in any tracepoint or struct_ops BPF program. Though they have no ABI stability guarantees, we should still document them. This patch adds a struct cgroup * subsection to the Core kfuncs section which describes each of these kfuncs.

David Vernet committed 3 years ago

Commit 36aa10f1 parent 25c5e922 files · +116 −1Browse files

Showing the changes to kernel (1 of 2 files). Show all

Unified · Split

kernel/bpf/helpers.c+1−1
@@ -1960,7 +1960,7 @@ struct cgroup *bpf_cgroup_kptr_get(struct cgroup **cgrpp) · 1959 unmodified lines
1960}1960}
1961 1961
1962/**1962/**
1963 * bpf_cgroup_release - Release the reference acquired on a struct cgroup *.1963 * bpf_cgroup_release - Release the reference acquired on a cgroup.
1964 * If this kfunc is invoked in an RCU read region, the cgroup is guaranteed to1964 * If this kfunc is invoked in an RCU read region, the cgroup is guaranteed to
1965 * not be freed until the current grace period has ended, even if its refcount1965 * not be freed until the current grace period has ended, even if its refcount
1966 * drops to 0.1966 * drops to 0.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t