sysfs_unbre...e_protection(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual page for sysfs_unbreak_active_protection(9) πŸ’–βœ¨ this one is short but the safety note is lowkey important.

πŸŽ€ NAME πŸŽ€

  • sysfs_unbreak_active_protection β€” restore "active" protection πŸ’…

✨ SYNOPSIS ✨

void sysfs_unbreak_active_protection (struct kernfs_node *kn );

🌸 ARGUMENTS 🌸

  • kn β€” the pointer returned by sysfs_break_active_protection. That's it, that's the argument 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this function literally undoes the effects of sysfs_break_active_protection 😌. Since this function calls kernfs_put on the kernfs node that corresponds to the 'attr' argument passed to sysfs_break_active_protection, that attribute may have been removed between the sysfs_break_active_protection and sysfs_unbreak_active_protection calls.

so fr fr: it is not safe to access kn after this function has returned. no cap, don't do it πŸ˜­πŸ’€

🌈 SEE ALSO 🌈

these are the references, periodt:

okay bye bestie!! source/version: ./fs/sysfs Β· date: October 2026 Β· footer title: sysfs_unbre...e_protection(9) πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from