sock_release(9)
π NAME π
okay bestie, this is the sock_release(9) page from the Kernel API Manual β and it does exactly what it says on the tin: sock_release closes a socket. periodt π
β¨ SYNOPSIS β¨
void sock_release (struct socket *sock );
π ARGUMENTS π
sockβ the socket to close. that's the whole arg, no cap π«Ά
πΈ DESCRIPTION πΈ
here's the lowkey tea: the socket gets released from the protocol stack if it has a release callback. then the inode is released if the socket is bound to an inode, not a file. that's the behavior, fr fr π
π¦ SEE ALSO π¦
Kernel file: ./net/socket.c
the whole squad is here:
move_addr_to_kernel(9)move_addr_to_user(9)sock_read_xattr(9)sock_alloc_file(9)sock_from_file(9)sockfd_lookup(9)sock_alloc(9)sock_sendmsg(9)kernel_sendmsg(9)sock_recvmsg(9)kernel_recvmsg(9)sock_create_lite(9)__sock_create(9)sock_create(9)sock_create_kern(9)sock_register(9)sock_unregister(9)kernel_bind(9)kernel_listen(9)kernel_accept(9)kernel_connect(9)kernel_getsockname(9)kernel_getpeername(9)kernel_sock_shutdown(9)kernel_sock_ip_overhead(9)
Source/version/date: ./net, October 2026, on sock_release(9) β bye bestie, go close those sockets responsibly πβ¨
π¦ 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