aa_free_ns(9)
π aa_free_ns(9) β like, the Kernel API Manual, but make it cute
okay so bestie, gather round, because today we're learning about aa_free_ns(9) from the Kernel API Manual (section 9, the ~cool~ section). Basically: it frees a profile namespace. That's the whole vibe. Simple, iconic, done. β¨
π NAME π
aa_free_ns β literally just frees a profile namespace. that's it. that's the function. π
πΈ SYNOPSIS πΈ
void aa_free_ns (struct aa_ns *ns );
no cap, that's the whole signature. void in, void out, namespace freed. slay. π«Ά
π¦ ARGUMENTS π¦
nsβ the namespace to free. and listen, this one's marked (MAYBE NULL), so don't come for me if it's NULL, it's literally allowed. π
β¨ DESCRIPTION β¨
okay so here's the part you actually need to remember, bestie, because it's giving prerequisites and we do not skip prerequisites. π
Requires: all references to the namespace must have been put. like, all of them. every single one. gone. put already.
and if the namespace was referenced by a profile confining a task? yeah, those references need to be put too. don't be out here freeing a namespace that still has refs holding on β that's not the move. π
lowkey this is a "clean up your room before you redecorate" situation. put the references first, then free. periodt. π
π₯ SEE ALSO π₯
the kernel file in question lives at ./security/apparmor/policy_ns.c β and here's the whole friend group, all tagged (9) because they're all in the same section, iykyk:
aa_ns_visible(9)aa_ns_name(9)alloc_ns(9)__aa_lookupn_ns(9)aa_lookupn_ns(9)__aa_find_or_create_ns(9)aa_prepare_ns(9)destroy_ns(9)__aa_remove_ns(9)__ns_list_release(9)aa_alloc_root_ns(9)
ngl that's a whole squad. go read them, they're all connected. πβ
and that's the page!! cute little sign-off time: this one came from the ./security/apparmor directory, dated October 2026, and it's filed under aa_free_ns(9) β like the header and footer said all along. ππ§π
mwah, go put your references before you free anything π
π¦ 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