aa_get_label_rcu(9)
π aa_get_label_rcu β Kernel API Manual, bestie edition π
okay so we're in the kernel API manual rn and this page is literally called aa_get_label_rcu(9), iykyk β¨ it's living in the AppArmor security corner of the kernel and honestly? she's a tiny little function with one very specific job and she does it π
πΈ NAME πΈ
aa_get_label_rcu β increment refcount on a label that can be replaced π¦
like yes that's the whole thing. it bumps the refcount. on a label. that can be replaced. main character energy fr fr π
β¨ SYNOPSIS β¨
struct aa_label * aa_get_label_rcu (struct aa_label __rcu **l );
ngl, look at that signature. she's giving pointer-to-pointer-to-a-label-that's-__rcu π₯ copy it exactly bestie, don't be creative with it π
π ARGUMENTS π
lβ pointer to the label that can be replaced, and it is NOT NULL π¨ like genuinely do not pass NULL here, that's not the vibe. also note it's astruct aa_label __rcu **β double pointer, RCU flavoured, iconic π
β RETURN β
- you get back a pointer to a refcounted label π«Ά slay, that's the good outcome
- else
NULLif there's no label π (basically the "nobody's home" outcome)
π SEE ALSO π
okay so go read these too, they're all hanging out together π―ββοΈ
- Kernel file
./security/apparmor/include/label.hβ where__aa_get_label(9)lives π aa_get_newest_label(9)aa_get_newest_label_condref(9)
π reminder: l is NOT NULL. that's not a suggestion, that's the contract, bestie π«Ά
and that's the page π§ source lives at ./security/apparmor/include and it's dated October 2026 β mwah, go forth and refcount responsibly ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms