Implement per-socket `so_lock' rwlock(9) and use it to protect routing
authormvs <mvs@openbsd.org>
Sun, 25 Apr 2021 00:00:34 +0000 (00:00 +0000)
committermvs <mvs@openbsd.org>
Sun, 25 Apr 2021 00:00:34 +0000 (00:00 +0000)
commite620dcac9f239fa4b82fe3dfd24714e5fb9fa38e
treee9e6ddec8d8541295a25e6c591fcbbaa918aa152
parent1dfe7d0da9b29725c5944dd13fe3f92f0eae2881
Implement per-socket `so_lock' rwlock(9) and use it to protect routing
(PF_ROUTE) sockets. This can be done because we have no cases where one
thread should lock two sockets simultaneously.

Also this time `so_lock 'used for routing sockets only but in the future
it will be used to other socket types too.

ok bluhm@
sys/kern/uipc_socket.c
sys/kern/uipc_socket2.c
sys/net/rtsock.c
sys/sys/socketvar.h