Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 2021 13:42:31 GMT
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 171633765c43 - main - sctp: avoid locking an already locked mutex
Message-ID:  <202109281342.18SDgVBP081760@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=171633765c4367dc233a4bf0e5926cb7c4decfc1

commit 171633765c4367dc233a4bf0e5926cb7c4decfc1
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2021-09-28 03:14:56 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2021-09-28 03:17:03 +0000

    sctp: avoid locking an already locked mutex
    
    Reported by:    syzbot+f048680690f2e8d7ddad@syzkaller.appspotmail.com
    Reported by:    syzbot+0725c712ba89d123c2e9@syzkaller.appspotmail.com
    MFC after:      1 week
---
 sys/netinet/sctp_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c
index c994b90b8353..17d834cd2734 100644
--- a/sys/netinet/sctp_timer.c
+++ b/sys/netinet/sctp_timer.c
@@ -1387,6 +1387,7 @@ sctp_audit_stream_queues_for_size(struct sctp_inpcb *inp, struct sctp_tcb *stcb)
 		SCTP_PRINTF("Hmm, stream queue cnt at %d I counted %d in stream out wheel\n",
 		    stcb->asoc.stream_queue_cnt, chks_in_queue);
 	}
+	SCTP_TCB_SEND_UNLOCK(stcb);
 	if (chks_in_queue) {
 		/* call the output queue function */
 		sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED);
@@ -1406,7 +1407,6 @@ sctp_audit_stream_queues_for_size(struct sctp_inpcb *inp, struct sctp_tcb *stcb)
 		    (u_long)stcb->asoc.total_output_queue_size);
 		stcb->asoc.total_output_queue_size = 0;
 	}
-	SCTP_TCB_SEND_UNLOCK(stcb);
 }
 
 int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109281342.18SDgVBP081760>