kobject_get_path(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– kobject_get_path πŸ’–

okay so welcome to the Kernel API Manual, section 9, bestie β€” this page is all about kobject_get_path(9), and it is literally here to allocate memory and fill in the path for @kobj. ✨

🌸 NAME 🌸

kobject_get_path β€” allocate memory and fill in the path for @kobj. that's the whole vibe. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

char * kobject_get_path (const struct kobject *kobj , gfp_t gfp_mask );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • kobj β€” the kobject in question, aka the one we're building the path with. πŸŽ€
  • gfp_mask β€” the allocation type used to allocate the path. yes, that's the allocation situation. ✨

πŸ’… RETURN πŸ’…

The newly allocated memory. Caller must free it with kfree. 🫢

bestie, this is the part where you remember to free it with kfree β€” the caller has to do that, no cap. πŸ’–

πŸ”₯ SEE ALSO πŸ”₯

The kernel file is ./lib/kobject.c, and here's the whole squad:


okay that's the page, bestie. signing off from ./lib, October 2026 β€” now go free that memory and slay. πŸ’œπŸ¦‹

πŸ“¦ where this page comes from