svn commit: r362874 - stable/12/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Wed Jul 1 21:56:21 UTC 2020


Author: tuexen
Date: Wed Jul  1 21:56:20 2020
New Revision: 362874
URL: https://svnweb.freebsd.org/changeset/base/362874

Log:
  MFC r356376:
  Ensure that we don't miss a trigger for kicking off the SCTP iterator.
  
  Reported by:	nwhitehorn

Modified:
  stable/12/sys/netinet/sctputil.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/sctputil.c
==============================================================================
--- stable/12/sys/netinet/sctputil.c	Wed Jul  1 21:54:39 2020	(r362873)
+++ stable/12/sys/netinet/sctputil.c	Wed Jul  1 21:56:20 2020	(r362874)
@@ -1475,12 +1475,11 @@ no_stcb:
 void
 sctp_iterator_worker(void)
 {
-	struct sctp_iterator *it, *nit;
+	struct sctp_iterator *it;
 
 	/* This function is called with the WQ lock in place */
-
 	sctp_it_ctl.iterator_running = 1;
-	TAILQ_FOREACH_SAFE(it, &sctp_it_ctl.iteratorhead, sctp_nxt_itr, nit) {
+	while ((it = TAILQ_FIRST(&sctp_it_ctl.iteratorhead)) != NULL) {
 		/* now lets work on this one */
 		TAILQ_REMOVE(&sctp_it_ctl.iteratorhead, it, sctp_nxt_itr);
 		SCTP_IPI_ITERATOR_WQ_UNLOCK();


More information about the svn-src-all mailing list