Introduce SB_OWNLOCK to mark sockets which `so_rcv' buffer modified
authormvs <mvs@openbsd.org>
Wed, 27 Mar 2024 22:47:53 +0000 (22:47 +0000)
committermvs <mvs@openbsd.org>
Wed, 27 Mar 2024 22:47:53 +0000 (22:47 +0000)
commit47517268b302171d3b3e5100a61f63c8cdbd5a97
treeec49e01caf75ea9c5f8e370796f7cd6982709a18
parentbe89428ce5fb176ef7adb0cb4f297af5f2b0fb91
Introduce SB_OWNLOCK to mark sockets which `so_rcv' buffer modified
outside socket lock.

`sb_mtx' mutex(9) used for this case and it should not be released between
`so_rcv' usage check and corresponding sbwait() sleep. Otherwise wakeup()
could be lost sometimes.

ok bluhm
sys/kern/uipc_socket.c
sys/kern/uipc_socket2.c
sys/sys/socketvar.h