Index: sys/kern/uipc_socket2.c =================================================================== RCS file: /mount/openbsd/cvs/src/sys/kern/uipc_socket2.c,v diff -u -p -u -p -r1.158 uipc_socket2.c --- sys/kern/uipc_socket2.c 12 Jul 2024 19:50:35 -0000 1.158 +++ sys/kern/uipc_socket2.c 20 Oct 2024 14:58:35 -0000 @@ -365,11 +365,8 @@ solock_shared(struct socket *so) switch (so->so_proto->pr_domain->dom_family) { case PF_INET: case PF_INET6: - if (ISSET(so->so_proto->pr_flags, PR_MPSOCKET)) { - NET_LOCK_SHARED(); - rw_enter_write(&so->so_lock); - } else - NET_LOCK(); + NET_LOCK_SHARED(); + rw_enter_write(&so->so_lock); break; default: rw_enter_write(&so->so_lock); @@ -425,11 +422,8 @@ sounlock_shared(struct socket *so) switch (so->so_proto->pr_domain->dom_family) { case PF_INET: case PF_INET6: - if (ISSET(so->so_proto->pr_flags, PR_MPSOCKET)) { - rw_exit_write(&so->so_lock); - NET_UNLOCK_SHARED(); - } else - NET_UNLOCK(); + rw_exit_write(&so->so_lock); + NET_UNLOCK_SHARED(); break; default: rw_exit_write(&so->so_lock); @@ -481,15 +475,9 @@ sosleep_nsec(struct socket *so, void *id switch (so->so_proto->pr_domain->dom_family) { case PF_INET: case PF_INET6: - if (ISSET(so->so_proto->pr_flags, PR_MPSOCKET) && - rw_status(&netlock) == RW_READ) { - rw_exit_write(&so->so_lock); - } + rw_exit_write(&so->so_lock); ret = rwsleep_nsec(ident, &netlock, prio, wmesg, nsecs); - if (ISSET(so->so_proto->pr_flags, PR_MPSOCKET) && - rw_status(&netlock) == RW_READ) { - rw_enter_write(&so->so_lock); - } + rw_enter_write(&so->so_lock); break; default: ret = rwsleep_nsec(ident, &so->so_lock, prio, wmesg, nsecs);