rtnl_dereference(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… rtnl_dereference β€” like, the Kernel API Manual one, bestie ✨

Okay so picture this: you're deep in kernel land, the Kernel API Manual is your whole personality, and you need to grab an RCU pointer but updates are already being blocked by RTNL. That's the entire vibe of rtnl_dereference(9). Let's get into it πŸŽ€


✨ NAME ✨

rtnl_dereference β€” fetch an RCU pointer when updates are prevented by RTNL πŸ¦‹

Like, the whole point: you want the pointer, and you already know RTNL has your back. No cap.


🌸 SYNOPSIS 🌸

rtnl_dereference (p );

That's it. That's the whole call. One argument, zero drama πŸ’…


πŸ’– ARGUMENTS πŸ’–

  • p β€” the pointer to read, before you dereference it. Read first, dereference second, that's the order, don't get cute with it πŸ™ˆ

⭐ RETURN ⭐

You get back the value of that specified RCU-protected pointer β€” but it omits the READ_ONCE, because the caller holds RTNL πŸ‘‘

lowkey important: the READ_ONCE is not there on purpose. You're holding RTNL, so it's fine. Do not go adding your own little flair to this, fr fr.

🫢 SEE ALSO 🫢

Kernel file ./include/linux/rtnetlink.h has the whole squad:

Go read them, they're iconic too 🌈


Okay bestie that's the page, go forth and dereference responsibly πŸ’œ This lil gem lives in ./include/linux, dated October 2026, and honestly? She ate. πŸ“βœ¨

πŸ“¦ where this page comes from