CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2025/02/05 01:28:25

Modified files:
        sys/kern       : uipc_socket.c 

Log message:
Rework filt_sor{modify,process}().

Split them by filt_sor*() and filt_soe*() functions for `soread_filtops'
and `soexcept_filtops' respectively. The filt_soexcept() path is like
filt_sowrite() and the `sb_mtx' serialization is pretty enough, but
filt_soread() is more complicated for the connection oriented sockets.
It is not yet clean is the concurrent SO_ACCEPTCONN transition safe for
select(2) and poll(2), so keep socket lock together with `sb_mtx' lock
for that case.

Get rid of sofilt_*lock() functions. They were temporary made to take
`sb_mtx' mutex with shared netlock for inet sockets case or with socket
lock for other cases. Now shared netlock is not enough and should be
taken together with `so_lock' rwlock. We have special solock_shared()
function for that purpose, so use it directly in corresponding
filt_sor*() handlers.

Tested by bluhm, additional arm64 tests by kirill.

ok kirill bluhm

Reply via email to