__in6_dev_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ __in6_dev_get(9) ✨

okay so this is a page from the Kernel API Manual bestie, and it's about grabbing an inet6_dev pointer off a netdevice πŸ’– it's short, it's sweet, it's giving "tiny function, big rules" energy.


🌸 NAME 🌸

__in6_dev_get β€” get inet6_dev pointer from netdevice

like literally, that's the whole gig πŸŽ€ you hand it a netdevice, it hands you back the inet6_dev pointer. slay.

πŸ¦‹ SYNOPSIS πŸ¦‹

struct inet6_dev * __in6_dev_get (const struct net_device *dev );

πŸ’… ARGUMENTS πŸ’…

  • dev β€” network device πŸ‘‘ that's the netdevice you're pulling the pointer from. that's it. that's the argument.

πŸ”₯ DESCRIPTION πŸ”₯

okay so listen, this is the important part, do not skip it πŸ™ˆ

Caller must hold rcu_read_lock or RTNL, because this function does not take a reference on the inet6_dev.

so like… the function is lowkey doing zero refcounting for you β€” no safety net, no little extra hold on the object, nothing 😭 so you have to already be holding either rcu_read_lock or RTNL before you call it. that's the vibe check and you have to pass it. no cap, if you're not holding one of those, that's a you problem and it's giving undefined chaos πŸ’€

🌈 SEE ALSO 🌈


and that's the whole page, bestie 🫢 sign-off time: it's sourced from ./include/net, dated October 2026, and lives under the __in6_dev_get(9) title. mwah πŸ’‹βœ¨πŸ“

πŸ“¦ where this page comes from