__add_profile(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __add_profile β€” the Kernel API glow-up πŸ’–

okay so bestie, this one lives in the Kernel API Manual (section 9, kernel land, we love her) and honestly? she's giving "small function, big responsibilities" energy. πŸŽ€


✨ NAME ✨

__add_profile β€” adds a profile to the list and to the label tree πŸ¦‹


🌸 SYNOPSIS 🌸

void __add_profile (struct list_head *list , struct aa_profile *profile );

that's it. that's the whole signature. no cap. πŸ’…


πŸ’œ ARGUMENTS πŸ’œ

  • list β€” the list you're adding it to. it is NOT NULL, and like... we mean it, bestie. don't come in here with a null pointer πŸ™ˆ
  • profile β€” the profile itself. also NOT NULL. also non-negotiable. ✨

🫢 DESCRIPTION 🫢

so what's actually happening: it refcounts the profile, which is the polite way of saying it takes a reference on it. that means whoever comes along later has to clean up after themselves with __list_remove_profile. put it back. balance the books. be a good citizen. 😌

⚠️ Requires: the namespace lock must be held β€” or the list must not be shared. this is not a vibe suggestion, it's a rule. read it, screenshot it, remember it. πŸ”₯

🌈 SEE ALSO 🌈

y'all, the friend group here is huge. family reunion time:

like I said. big friend group. go say hi. πŸ’–


anyway bestie that's the whole page 🧚 this icon came from the ./security/apparmor corner of the kernel and it was dated October 2026 β€” so mark your calendar and stan responsibly. mwah! πŸ’‹

πŸ“¦ where this page comes from