bpf_cgroup_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ bpf_cgroup_acquire(9) πŸŽ€

okay so this is the Kernel API Manual page for bpf_cgroup_acquire, and it's giving β€œgrab a cgroup reference but do NOT forget to clean up” energy ✨. Bestie, read the release note below, because leaving a ref hanging is not the vibe πŸ’€.

✨ NAME ✨

bpf_cgroup_acquire β€” acquire a reference to a cgroup. A cgroup acquired by this kfunc which is not stored in a map as a kptr, must be released by calling bpf_cgroup_release().

No cap: if this kfunc hands you a cgroup and it is not stored in a map as a kptr, you must release it with bpf_cgroup_release(). Like, do not leave it on read, periodt 🫢.

🌸 SYNOPSIS 🌸

__bpf_kfunc struct cgroup * bpf_cgroup_acquire (struct cgroup *cgrp );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • cgrp β€” the cgroup on which a reference is being acquired. That's the actual cgroup you're grabbing a ref on, iykyk.

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./kernel/bpf/helpers.c is right there in the mix, and the whole squad is:


okay that's the page, bestie 🫢 this one is from source/version ./kernel/bpf, dated October 2026, and bpf_cgroup_acquire(9) is signing off πŸ’…βœ¨

πŸ“¦ where this page comes from