Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 May 2020 02:53:02 +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-11@freebsd.org
Subject:   svn commit: r360755 - stable/11/sys/netinet
Message-ID:  <202005070253.0472r2pZ012982@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu May  7 02:53:02 2020
New Revision: 360755
URL: https://svnweb.freebsd.org/changeset/base/360755

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

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

Modified: stable/11/sys/netinet/sctputil.c
==============================================================================
--- stable/11/sys/netinet/sctputil.c	Thu May  7 02:46:57 2020	(r360754)
+++ stable/11/sys/netinet/sctputil.c	Thu May  7 02:53:02 2020	(r360755)
@@ -1472,12 +1472,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?202005070253.0472r2pZ012982>