aa_free_profile(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– aa_free_profile(9) πŸ’–

okay so this page is from the Kernel API Manual, and it's giving "cleanup era" energy fr fr. No cap, it's about freeing a profile and all its little besties.

✨ NAME ✨

aa_free_profile β€” free a profile 🫢

🫢 SYNOPSIS 🫢

void aa_free_profile (struct aa_profile *profile );

πŸ™ˆ ARGUMENTS πŸ™ˆ

  • profile β€” the profile to free (MAYBE NULL) πŸ™ˆ

πŸ’… DESCRIPTION πŸ’…

It frees a profile, its hats and null_profile. Like, all of them. The whole little squad. πŸ’–

All references to the profile, its hats and null_profile must have been put before this runs β€” every single reference, no leftovers, periodt. ✨

⚠️ If the profile was referenced from a task context, free_profile will be called from an rcu callback routine, so we must not sleep here. That's the vibe check you literally cannot fail. 😭

🌈 SEE ALSO 🌈

Kernel file ./security/apparmor/policy.c is the home base, and these are the linked besties:

mwah πŸ’‹ β€” source/version: ./security/apparmor, dated October 2026 ✨

πŸ“¦ where this page comes from