put_cred_many(9)
β¨ put_cred_many(9) β¨
ok so this is a page from the Kernel API Manual bestie, and it's about put_cred_many β the little cleanup function that says "we're done with these creds now, byeee" π
πΈ NAME πΈ
put_cred_many β release a reference to a set of credentials
π SYNOPSIS π
void put_cred_many (const struct cred *_cred , int nr );
π¦ ARGUMENTS π¦
_credβ the credentials you're releasing, king πnrβ how many references you're letting go of, no cap
π DESCRIPTION π
So what it does is: it releases a reference to a set of credentials, and when the very last ref gets released, the creds get deleted too β like, actually gone, that's the moment they yeet out of existence π«Ά
And if you pass NULL? Literally nothing happens. Nothing. Zero. Nada. It just vibes π
Now, the reason _cred is a const pointer to a set of credentials is because the credentials on task_struct are attached by const pointers β and that's on purpose, to prevent anyone from accidentally altering credential sets that are meant to be immutable. It's giving "look but don't touch" energy π₯ iykyk.
π SEE ALSO π
- Kernel file
./include/linux/cred.h get_group_info(9)put_group_info(9)get_cred_many(9)current_cred(9)current_real_cred(9)__task_cred(9)get_current_cred(9)get_current_user(9)get_current_groups(9)
ngl bestie, go read the whole cred family, they're all iconic in their own way π
and that's the page!! π§ from ./include/linux, dated October 2026 β mwah, slay, see u next time πβ¨
π¦ 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