kobject_put(9)
β¨ kobject_put(9) β¨
okay so bestie, you're looking at kobject_put(9) from the Kernel API Manual and honestly? she's short, she's sweet, she's lowkey the most important four lines of your whole driver. let's get into it π«Ά
πΈ NAME πΈ
kobject_put β Decrement refcount for object. that's it, that's the whole job, and she does it flawlessly π
π¦ SYNOPSIS π¦
void kobject_put (struct kobject *kobj );
no return value, no drama, no notes. iconic behavior only π
π ARGUMENTS π
kobjβ object. that's the one. the object whose refcount we're about to send down a notch π
π DESCRIPTION π
okay so here's the tea β β kobject_put decrements the refcount, and if that count hits 0, it calls kobject_cleanup. literally that simple, no cap. you drop your reference, and if nobody else is holding on, cleanup gets the party started π₯
fr fr, one function, one job, main character energy β¨
π SEE ALSO π
bestie there is a whole kobject family and you're gonna wanna know all of them, so here's the full guest list π
Kernel file ./lib/kobject.c:
kobject_namespace(9)kobject_get_ownership(9)kobject_get_path(9)kobject_set_name_vargs(9)kobject_set_name(9)kobject_init(9)kobject_add(9)kobject_init_and_add(9)kobject_rename(9)kobject_move(9)kobject_del(9)kobject_get(9)kobject_create(9)kobject_create_and_add(9)kset_init(9)kset_register(9)kset_unregister(9)kset_find_obj(9)kset_create(9)kset_create_and_add(9)
likeβ¦ a whole friend group π go read them, iykyk π§
π reminder from your girl: putting a kobject means you're giving up your reference. don't touch it after. periodt.
mwah π this page came from the ./lib source, dated October 2026, and she's filed under kobject_put(9) β catch you in the next manpage, bestie π
π¦ 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