aa_get_profile_rcu(9)
π aa_get_profile_rcu(9) β from the Kernel API Manual, bestie
okay so picture this: you're deep in AppArmor land, poking at profiles that other code might swap out from under you at literally any moment π and you need to grab one safely and bump its refcount. That's the whole gig. It's giving "hold my spot, I'll be right back" energy π
β¨ NAME β¨
aa_get_profile_rcu β increment a refcount profile that can be replaced, no cap π₯
Like, the profile is a moving target, and this function is how you snag it without things going sideways π
πΈ SYNOPSIS πΈ
struct aa_profile * aa_get_profile_rcu (struct aa_profile __rcu **p );
That's it. One parameter. One return. So clean, so iconic, honestly β¨
π¦ ARGUMENTS π¦
pβ pointer to profile that can be replaced β and like, NOT NULL, okay?? π«Ά This is not the function where you get to be cute and passNULL. The docs said NOT NULL and they meant it. Respect the boundary π
π RETURN π
Returns a pointer to a refcounted profile β slay, now you own a reference and you're responsible for it π
Otherwise it's NULL if there's no profile. That's the "nobody's home" result, and you should absolutely check for it π
π SEE ALSO π
Kernel file ./security/apparmor/include/policy.h β that's the mothership, go look π§
aa_get_pdb(9)aa_put_pdb(9)aa_get_newest_profile(9)aa_get_profile(9)aa_get_profile_not0(9)aa_put_profile(9)
The whole refcount friend group fr fr β getters and putters living in harmony π
lowkey important: aa_get_profile_rcu and friends are the AppArmor refcount squad. Grab with a get, release with a put. If you get and never put, that's a leak bestie, and nobody wants that ππ
and that's the page!! π brought to you by ./security/apparmor/include, dated October 2026 β Kernel API Manual, aa_get_profile_rcu(9), periodt. πβ
π¦ 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