inet_csk_clone_lock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

inet_csk_clone_lock(9) β€” clone an inet socket, and lock its clone πŸ’–

okay bestie, this is the Kernel API Manual entry for inet_csk_clone_lock, and it’s literally the β€œmake a clone and lock it” moment. We’re keeping every detail, no cap.


NAME ✨

inet_csk_clone_lock β€” clone an inet socket, and lock its clone πŸŽ€

SYNOPSIS πŸ¦‹

struct sock * inet_csk_clone_lock (const struct sock *sk , const struct
       request_sock *req , const gfp_t priority );

ARGUMENTS πŸŽ€

  • sk β€” the socket to clone πŸ’…
  • req β€” request_sock
  • priority β€” for allocation (GFP_KERNEL, GFP_ATOMIC, etc)

DESCRIPTION πŸ”₯

The caller must unlock the socket even in the error path β€” yes, bestie, even when things go sideways 😭. The original spells it out as bh_unlock_sock(newsk), and that cleanup is not optional. It’s giving mandatory-unlock energy, fr fr.

no skipping the unlock, even on the error path β€” that’s the whole caveat πŸ‘‘

SEE ALSO 🌈


okay bye bestie 🫢 this one comes from source ./net/ipv4, dated October 2026, and the page is inet_csk_clone_lock(9) βœ¨πŸ’…

πŸ“¦ where this page comes from