svn commit: r360714 - stable/11/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Wed May 6 22:20:54 UTC 2020


Author: tuexen
Date: Wed May  6 22:20:53 2020
New Revision: 360714
URL: https://svnweb.freebsd.org/changeset/base/360714

Log:
  MFC r350254: Improve SCTP locking
  
  Don't hold a mutex while calling sbwait. This was found by syzkaller.
  
  Submitted by:		rrs
  Reported by:		markj

Modified:
  stable/11/sys/netinet/sctp_output.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/sctp_output.c
==============================================================================
--- stable/11/sys/netinet/sctp_output.c	Wed May  6 22:20:37 2020	(r360713)
+++ stable/11/sys/netinet/sctp_output.c	Wed May  6 22:20:53 2020	(r360714)
@@ -13399,10 +13399,10 @@ skip_preblock:
 					    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);
 			/*-


More information about the svn-src-all mailing list