__policy_find(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, meet __policy_find(9) from the Kernel API Manual β€” it's the helper that finds a policy by @name on a policy list. lowkey iconic, no cap. πŸ’–

⭐ SYNOPSIS ⭐

struct aa_policy * __policy_find (struct list_head *head , const char *name );

πŸŽ€ ARGUMENTS πŸŽ€

  • head β€” the list to search. It is NOT NULL (like, fr fr, do not pass NULL here πŸ™ˆ).
  • name β€” the name to search for. Also NOT NULL (same vibe check, bestie ✨).

πŸ¦‹ DESCRIPTION πŸ¦‹

Requires: rcu_read_lock be held. That's the whole requirement, and it's giving very β€œdo not skip this step” energy. πŸ’…

πŸ”₯ RETURN πŸ”₯

It returns the unrefcounted policy that match name, or NULL if it's not found. So yeah: found = policy, not found = NULL. Periodt. πŸ’€

🌈 SEE ALSO 🌈


cute little sign-off: source/version stamp is ./security/apparmor/include, date is October 2026. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from