ksmbd_tcp_new_connection(9)
π ksmbd_tcp_new_connection(9)
okay bestie, welcome to the Kernel API Manual β¨ today's main character is ksmbd_tcp_new_connection β yes that's the whole function name, it's a mouthful, we love her anyway π
πΈ NAME πΈ
ksmbd_tcp_new_connection β the girl who spins up a brand-new tcp session the moment somebody mounts π¦
β¨ SYNOPSIS β¨
int ksmbd_tcp_new_connection (struct socket *client_sk );
literally one argument, no drama, we stan a low-maintenance signature π
π«Ά ARGUMENTS π«Ά
client_skβ the socket that's attached to the new connection. that's her. that's the vibe check. π₯
π DESCRIPTION π
so here's the tea β β whenever a new connection is requested, this function creates a conn thread (which is also called the session thread, iykyk, two names one icon π ) so that all the new incoming smb requests from that connection actually get handled π
likeβ¦ somebody knocks, and we hand them their own personal thread to hang out in. main character energy for every single connection fr fr π
β RETURN β
0β slay, success π- otherwise β an error π« (not slay)
π¦ SEE ALSO π¦
- Kernel file
./fs/smb/server/transport_tcp.cπ kvec_array_init(9)get_conn_iovec(9)ksmbd_kthread_fn(9)ksmbd_tcp_run_kthread(9)ksmbd_tcp_readv(9)ksmbd_tcp_read(9)create_socket(9)
go read those too, they're all in the group chat π§π
and that's the whole page, bestie β¨ this came out of ./fs/smb/server, dated October 2026 β no cap, that's the source and the version right there, mwah πππ
π¦ 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