From 2e8bb5ddf4bfafd88cabf6009c9bf54f3edaaad5 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sat, 9 Sep 2017 20:51:54 +0000 Subject: [PATCH] Fix a locking issue found by Coverity scanning the usrsctp library. MFC after: 3 days --- sys/netinet6/sctp6_usrreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index 4e5a64710d9..c88ca96f5c2 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -879,7 +879,7 @@ sctp6_connect(struct socket *so, struct sockaddr *addr, struct thread *p) if (inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) { stcb = LIST_FIRST(&inp->sctp_asoc_list); if (stcb) { - SCTP_TCB_UNLOCK(stcb); + SCTP_TCB_LOCK(stcb); } SCTP_INP_RUNLOCK(inp); } else {