objpool_drop(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… objpool_drop(9) β€” like, the Kernel API Manual page you actually wanna read πŸŽ€

okay bestie, pull up a chair ✨ this one's from the Kernel API Manual and it's lowkey one of the more dramatic little functions in the objpool saga. it's giving "last one out turns off the lights" energy, and honestly? iconic. πŸ•―οΈ


🌸 NAME 🌸

objpool_drop β€” discard the object and deref objpool. that's it, that's the whole vibe. drop the object, deref the pool, slay. πŸ’…


✨ SYNOPSIS ✨

int objpool_drop (void *obj , struct objpool_head *pool );

look at her. four words and a return type. main character energy fr fr 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • obj β€” object ptr to be discarded. yeah, the actual pointer to the object you're letting go of. bye bestie πŸ‘‹
  • pool β€” object pool. the pool it belongs to, natch. 🏊

πŸ’€ RETURN πŸ’€

  • 0 β€” if objpool was released. congrats, the pool is free, she's done, periodt πŸŽ‰
  • -EAGAIN β€” if there are still outstanding objects. nope, not yet, some of the girlies are still in use 😭 try again later

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea, bestie 🍡 objpool_drop is normally for the release of outstanding objects after objpool cleanup β€” that's objpool_fini, iykyk.

think of this example, because it's the whole point:

a kretprobe is unregistered and objpool_fini is called to release all remained objects, but there are still objects being used by unfinished kretprobes (like blockable function: sys_accept). 😬

so yeah β€” objpool_fini shows up like "everyone out" and a couple of objects are still mid-sidequest. rude. but fair.

so only when the last outstanding object is dropped could the whole objpool be released β€” along with the call of objpool_drop. 🧚 it's literally the last one to leave the party, turning off the lights, locking the door. no cap. the pool cannot go until every single outstanding object has been dropped. that's the rule and she is not flexible about it πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/objpool.h β€” plus these absolute icons:

go read them all, they're a whole saga, you'll be obsessed 🌈


okay that's the page!! πŸ“ sourced from ./include/linux, dated October 2026, and yes it lives at objpool_drop(9) β€” mwah, go drop some objects responsibly, ily πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from