Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jul 2020 21:56:20 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r362874 - stable/12/sys/netinet
Message-ID:  <202007012156.061LuKjX032205@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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();



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