Release inpcb mutex while calling sbwait().
authorbluhm <bluhm@openbsd.org>
Tue, 19 Dec 2023 21:34:22 +0000 (21:34 +0000)
committerbluhm <bluhm@openbsd.org>
Tue, 19 Dec 2023 21:34:22 +0000 (21:34 +0000)
commit4460956e4934ccaa45b56c3a24e835b55f4ce9f0
tree24fadb1dd99c0dbe13c5776575bf640baf10b883
parentf69555e6080f85b3027f2847fe1b77dd689bde73
Release inpcb mutex while calling sbwait().

As sbwait() may sleep, holding any mutex is not allowed.  Call
pru_unlock() before sbwait() in soreceive().

Bug spotted by sashan@; OK sashan@ mvs@
sys/kern/uipc_socket.c