Destroy protocol control block before perform `so_q0' and `so_q' queues
authormvs <mvs@openbsd.org>
Thu, 11 Nov 2021 16:35:09 +0000 (16:35 +0000)
committermvs <mvs@openbsd.org>
Thu, 11 Nov 2021 16:35:09 +0000 (16:35 +0000)
commitb1df0fa1191b51a596eeb114f0e8e5be19f70346
tree15f455fca0c31bc240dc72e559a759ce6bf3a8e0
parent78e4aa5d11dd5b11c75f63a59bfd43ff9d87face
Destroy protocol control block before perform `so_q0' and `so_q' queues
cleanup.

The dying socket is already unlinked from the file descriptor layer, but
still accessible from the stack or from the file system layer. We need to
unlink the socket to prevent concurrent connection when we unlocked dying
socket while we perform `so_q0' or `so_q' queues cleanup or while we
perform (*pr_detach)(). This unlocking will be appeared with the upcoming
fine grained locked sockets diffs.

ok bluhm@
sys/kern/uipc_socket.c