add_taint(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… add_taint(9)

okay so bestie, we're in the Kernel API Manual today and this one is short but iconic β€” it's literally the function that lets the kernel raise its hand and say "hey. something is up." 🫢


✨ NAME ✨

add_taint β€” adds a taint flag, but only if that flag isn't already set. no double-dipping, no cap πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

void add_taint (unsigned flag , enum lockdep_ok lockdep_ok );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • flag β€” one of the TAINT_* constants. that's the whole vibe check, pick your flag 🌸
  • lockdep_ok β€” tells the kernel whether lock debugging is still OK. lowkey the important one πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so if something bad has gone wrong, bestie, you're gonna want lockdebug_ok = false. like, fully. do not pass go.

but for some notewortht-but-not-corrupting cases, it can be set to true. yes, notewortht is literally how it's spelled in the source and honestly? we stan a typo that made it to production πŸ’€βœ¨

fr fr though: the distinction matters. false = something actually went wrong. true = noteworthy but not corrupting. don't get them twisted πŸ™ˆ

🌈 SEE ALSO 🌈


and that's the page, bestie πŸ’œ it lives under ./kernel and the docs are dated October 2026 β€” periodt, go forth and taint responsibly πŸ§šβ€β™€οΈπŸŽ€

πŸ“¦ where this page comes from