inet_csk_clone_lock(9)
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_sockpriorityβ 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 π
- Kernel file
./net/ipv4/inet_connection_sock.c inet_sk_get_local_port_range(9)
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
- 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