Use shared socket/net lock for IP sockets
authorkn <kn@openbsd.org>
Wed, 30 Nov 2022 13:58:39 +0000 (13:58 +0000)
committerkn <kn@openbsd.org>
Wed, 30 Nov 2022 13:58:39 +0000 (13:58 +0000)
commite5476f52dc2fdba76b5588198e91db5a59b6d73e
tree05c5f5e0904c42b699767746a48c644c05efafbf
parentf0ca6b40da78dfadbe7cf3ff4085924f29f35db8
Use shared socket/net lock for IP sockets

so{,un}lock_shared() take the shared net lock for PF_INET and PF_INET6
while sticking to the exclusive rwlock elsewhere.

getsockopt(2), getsockname(2) and getpeername(2) (all UNLOCK) do not
write, so the exclusive net lock is overkill here.

OK mvs
sys/kern/uipc_syscalls.c