ksmbd_tcp_run_kthread(9)
π ksmbd_tcp_run_kthread β like, the kernel API manual, bestie β¨
okay so this is a page from the Kernel API Manual, and it's about ksmbd_tcp_run_kthread. yes it's a mouthful, no we're not pronouncing it out loud. let's get into it π
β¨ NAME β¨
ksmbd_tcp_run_kthread β start forker thread π§΅β¨
πΈ SYNOPSIS πΈ
int ksmbd_tcp_run_kthread (struct interface *iface );
that's it. that's the whole signature. slay. π
π¦ ARGUMENTS π¦
ifaceβ pointer tostruct interface. just a lil pointer, she's pointing at the interface struct, that's her whole job π«Ά
π DESCRIPTION π
okay bestie so here's the vibe: this function starts the forker thread (ksmbd/0) at module init time. so like when the module wakes up and does its lil stretch, this bad boy spins up and starts listening on port 445 for new SMB connection requests ππ₯
and then β this is the iconic part β it creates per connection server threads (ksmbd/x). one lil thread for each connection. main character energy for every single one of them, no cap πβ¨
π RETURN π
0β success, we ate, we slayed π π- error number β not success, it's giving error, handle it π
β SEE ALSO β
- Kernel file
./fs/smb/server/transport_tcp.cβ go read the source, iykyk π kvec_array_init(9)get_conn_iovec(9)ksmbd_tcp_new_connection(9)ksmbd_kthread_fn(9)ksmbd_tcp_readv(9)ksmbd_tcp_read(9)create_socket(9)
all of these are lowkey obsessed with the same file, go check em out π¦
ngl this one's short but she's important. forker thread goes brrr, connections get their own threads, and everyone lives happily ever after π§π
anyway that's the page!! brought to you by ./fs/smb/server, October 2026, and the one and only ksmbd_tcp_run_kthread(9). periodt. πΈπ«Άπ
π¦ 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