CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2024/12/27 03:18:04

Modified files:
        sys/kern       : uipc_socket.c 

Log message:
Simplify tcp(4) sockets unsplicing.

tcp(4) PCB layer can destroy only sockets which were not yet accepted.
Such sockets are not accessible from the userland and can't be spliced.

For userland accessible sockets, tcp(4) PCB layer only destroys PCB, but
left the socket alive. The socket destruction always happens through
soclose() path.

So while sofree() called from the soclose() path, it's safe to release
netlock and wait threads which works with this dying socket.

Drop the exception for tcp(4) sockets unsplicing in the soclose() and
follow the common path for both tcp(4) and udp(4) sockets. Also use
barrierr for `ssp_idleto' timeout and `ssp_task' task destruction instead
of re-initialise them in runtime.

ok bluhm

Reply via email to