From b89e25f0db8bd416674e32555421c01e861d541e Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sat, 7 Sep 2019 11:24:29 +0000 Subject: [PATCH] MFC r350254: Don't hold a mutex while calling sbwait. This was found by syzkaller. Submitted by: rrs@ Reported by: markj@ --- sys/netinet/sctp_output.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 6a28d8b0660..7a1575d0216 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -13409,10 +13409,10 @@ sctp_lower_sosend(struct socket *so, stcb, SCTP_OUTPUT_FROM_USR_SEND, SCTP_SO_LOCKED); } - if (hold_tcblock == 1) { - SCTP_TCB_UNLOCK(stcb); - hold_tcblock = 0; - } + } + if (hold_tcblock == 1) { + SCTP_TCB_UNLOCK(stcb); + hold_tcblock = 0; } SOCKBUF_LOCK(&so->so_snd); /*- -- 2.45.0