git: 171633765c43 - main - sctp: avoid locking an already locked mutex

Michael Tuexen tuexen at FreeBSD.org
Tue Sep 28 13:42:32 UTC 2021


The branch main has been updated by tuexen:

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

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

    sctp: avoid locking an already locked mutex
    
    Reported by:    syzbot+f048680690f2e8d7ddad at syzkaller.appspotmail.com
    Reported by:    syzbot+0725c712ba89d123c2e9 at 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


More information about the dev-commits-src-main mailing list