__end_cred_crit_section(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __end_cred_crit_section β€” Kernel API Manual, section 9, bestie

okay so picture this: you're in the kernel, you opened a crit section, and now you gotta close it. that's literally her whole job. she's the closing bracket energy of the AppArmor cred world πŸŽ€

✨ NAME ✨

__end_cred_crit_section β€” bestie, this is the one that ends the crit section that __begin_... started. that's it, that's the vibe. πŸ¦‹


✨ SYNOPSIS ✨

void __end_cred_crit_section (struct aa_label *label , bool needput );

look at her. two arguments. no notes. iconic. πŸ‘‘


✨ ARGUMENTS ✨

  • label β€” the label you got from __begin_cred_crit_section. like, the same one. don't be out here inventing labels, okay? 🫢
  • needput β€” this is an output: a bool that gets set by __begin_cred_crit_section. so __begin hands you this lil truthy flag and you pass it right back in here. it's giving "you dropped this πŸ‘‘" energy.

✨ DESCRIPTION ✨

okay so the cred you passed to __begin is guaranteed to not change β€” that part's locked in, no cap. πŸ”₯

and like, sure, technically the cred and the label could both be passed here instead of needput. but here's the thing β€” using needput with a local var makes it so much easier for the compiler and the processor to optimize and speculatively execute the comparison than chasing a pointer around inside the cred struct. 🧚

so it's not just quirky, it's fast. it's giving "she's pretty AND she's efficient." πŸ’…βœ¨


✨ SEE ALSO ✨


fr fr, this is a begin/end pair. if you call __end without the matching __begin, that's a you problem and not a cute one. πŸ™ˆ

mwah πŸ’‹ that's all from the ./security/apparmor/include girlies β€” this page was dated October 2026, in the Kernel API Manual, and she's __end_cred_crit_section(9) if you need her again. periodt. πŸŒˆπŸŽ€

πŸ“¦ where this page comes from