__find_child(9)
π __find_child(9) β Kernel API Manual π
okay so bestie, welcome to the __find_child page from the Kernel API Manual β this is the little gremlin function that goes digging through a list of AppArmor profiles looking for one whose name matches. she's giving "where's my bestie" energy and honestly? iconic. π
β¨ NAME β¨
__find_child β find a profile on @head list with a name matching @name π¦
β¨ SYNOPSIS β¨
struct aa_profile * __find_child (struct list_head *head , const char *name );
β¨ ARGUMENTS β¨
headβ the list you're gonna search. NOT NULL, bestie, do not come in here with a null pointer, fr fr πnameβ the name of the profile you're hunting for. also NOT NULL. no cap. π
β¨ DESCRIPTION β¨
okay so here's the vibe check: this function requires that rcu_read_lock be held. like, that's the prerequisite. it's required, not a suggestion, not a cute optional accessory β keep that read lock held or the whole thing is a bad time. π₯
β¨ RETURN β¨
she hands you back an unrefcounted profile ptr β or NULL if nothing was found. that's the whole deal. if it's NULL, the profile's just not there, don't take it personally π«Ά
like literally β an unrefcounted pointer. keep that in mind, it's not doing the refcount math for you.
β¨ SEE ALSO β¨
Kernel file ./security/apparmor/policy.c β and the whole extended friend group, because she does not exist in a vacuum, periodt:
aa_pdb_free_kref(9)__add_profile(9)__list_remove_profile(9)__remove_profile(9)__aa_profile_list_release(9)aa_free_data(9)aa_free_profile(9)aa_alloc_profile(9)__strn_find_child(9)aa_find_child(9)__lookup_parent(9)__create_missing_ancestors(9)__lookupn_profile(9)aa_lookupn_profile(9)__aa_new_learning_profile(9)replacement_allowed(9)audit_policy(9)aa_policy_view_capable(9)aa_may_manage_policy(9)__replace_profile(9)__lookup_replace(9)aa_replace_profiles(9)aa_remove_profiles(9)
and that's the whole page bestie!! πβ this one ships out of ./security/apparmor and it's dated October 2026, so go forth, hold your rcu_read_lock, find your child, and slay πππ«
π¦ 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