diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2024-02-11 21:36:50 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2024-02-11 21:36:50 +0000 |
commit | 611fbb1fd2b95435a2e4a123d3e87b46e2ed613d (patch) | |
tree | 44defa0b7d8d2097e789d6d7169ab64bf4fd3e7b /sys | |
parent | 3633e13b38c4d94ddd29d7fb31bc64fefec83fee (diff) |
Release `sb_mtx' mutex(9) before sbunlock().
ok bluhm
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/uipc_socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 9a2bda2aa14..6d7422c798a 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.318 2024/02/11 18:14:26 mvs Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.319 2024/02/11 21:36:49 mvs Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -900,8 +900,8 @@ restart: } SBLASTRECORDCHK(&so->so_rcv, "soreceive sbwait 1"); SBLASTMBUFCHK(&so->so_rcv, "soreceive sbwait 1"); - sbunlock(so, &so->so_rcv); sb_mtx_unlock(&so->so_rcv); + sbunlock(so, &so->so_rcv); error = sbwait(so, &so->so_rcv); if (error) { sounlock_shared(so); @@ -1179,8 +1179,8 @@ dontblock: if (orig_resid == uio->uio_resid && orig_resid && (flags & MSG_EOR) == 0 && (so->so_rcv.sb_state & SS_CANTRCVMORE) == 0) { - sbunlock(so, &so->so_rcv); sb_mtx_unlock(&so->so_rcv); + sbunlock(so, &so->so_rcv); goto restart; } @@ -1190,8 +1190,8 @@ dontblock: if (flagsp) *flagsp |= flags; release: - sbunlock(so, &so->so_rcv); sb_mtx_unlock(&so->so_rcv); + sbunlock(so, &so->so_rcv); sounlock_shared(so); return (error); } |