Use solock() instead solock_shared() within sys_getsockopt(). Otherwise
authormvs <mvs@openbsd.org>
Thu, 12 Jan 2023 10:59:36 +0000 (10:59 +0000)
committermvs <mvs@openbsd.org>
Thu, 12 Jan 2023 10:59:36 +0000 (10:59 +0000)
commit9cf4e548dcbe6d865fcbcd97381cbcbf79ae3f25
treea086c5ca5e7c9513728e853136e45afe0bd42750
parent9043a9334fd1948142178fd719e83e363eae621b
Use solock() instead solock_shared() within sys_getsockopt(). Otherwise
we acquiring kernel lock with mutex(9) held. This partially reverts
rev 1.205 of sys/kern/uipc_syscalls.c. Shared solock() is still fine for
getsockname(2) and getpeername(2).

Reported-by: syzbot+00a4824cb1b6a214c7d6@syzkaller.appspotmail.com
ok kn@ claudio@
sys/kern/uipc_syscalls.c