Author: tuexen
Date: Sun Jan  5 13:56:32 2020
New Revision: 356376
URL: https://svnweb.freebsd.org/changeset/base/356376

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

Modified:
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c Sun Jan  5 12:48:19 2020        (r356375)
+++ head/sys/netinet/sctputil.c Sun Jan  5 13:56:32 2020        (r356376)
@@ -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();
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to