inet_sk_state_load(9)
π inet_sk_state_load(9)
okay so bestie, welcome to the Kernel API Manual, section 9 β yes this is a manpage for a kernel function and we're gonna make it make sense π«Ά
β¨ NAME β¨
inet_sk_state_load β read sk->sk_state for lockless contexts ππ«
like, you wanna peek at a socket's state without holding the lock? this is the girl for the job, no cap.
π SYNOPSIS π
int inet_sk_state_load (const struct sock *sk );
that's it. that's the whole signature. iconic, honestly π
πΈ ARGUMENTS πΈ
skβ socket pointer. that's your socket bestie, the one you're trying to get the state out of π¦
π DESCRIPTION π
So here's the vibe: inet_sk_state_load is paired with inet_sk_state_store β they're a matched set, yin and yang, the two halves of a friendship bracelet π«Άβ¨
This one is used in places where we don't hold the socket lock β lowkey the whole reason it exists, fr fr. the spots it shows up in are:
tcp_diag_get_infotcp_get_infotcp_pollget_tcp4_sock- ... and more (the original is literally trailing off with
...so we're respecting that π)
so like, when you can't grab the lock but you still need the state? that's the assignment, and she ate π₯
π SEE ALSO π
- Kernel file
./include/net/inet_sock.h sk_to_full_sk(9)inet_sk_state_store(9)
go read those too, iykyk ππ
and that's the whole page, bestie π this little icon came from the kernel file path ./include/net, dated October 2026, and it's filed under inet_sk_state_load(9) β mwah, go touch some sockets πππΈ
π¦ 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