CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2025/01/05 04:33:45

Modified files:
        sys/kern       : uipc_syscalls.c 

Log message:
Unlock accept(4) for tcp sockets.

Makes sense because accept(2) could be fast path. tcp_accept() is the
only in_setpeeraddr() which copies `inp_fport' and `inp_faddr' to passed
mbuf(9). Shared netlock with `so_lock' taken is pretty enough, but both
sockets should be locked simultaneously.

So yet another solock() variation. The second arg of doaccept_so*lock()
controls shared netlock acquisition and release. tcp(4) sockets are
PR_MPSOCKET sockets, so soleep_nsec() will be happy. We have some raw
inet6 sockets which are not PR_MPSOCKET, but they never follow this
path.

Note, we modify `so_qlen' of listening socket but filt_soread() takes
only shared netlock. This should be enough because we cache `so_qlen'
to local variable.

ok bluhm

Reply via email to