svn commit: r366221 - stable/11/sys/netgraph

Mark Johnston markj at FreeBSD.org
Mon Sep 28 11:48:20 UTC 2020


Author: markj
Date: Mon Sep 28 11:48:20 2020
New Revision: 366221
URL: https://svnweb.freebsd.org/changeset/base/366221

Log:
  MFC r366167:
  ng_l2tp: Fix callout synchronization in the rexmit timeout handler
  
  PR:	241133

Modified:
  stable/11/sys/netgraph/ng_l2tp.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netgraph/ng_l2tp.c
==============================================================================
--- stable/11/sys/netgraph/ng_l2tp.c	Mon Sep 28 11:46:03 2020	(r366220)
+++ stable/11/sys/netgraph/ng_l2tp.c	Mon Sep 28 11:48:20 2020	(r366221)
@@ -1454,15 +1454,17 @@ ng_l2tp_seq_rack_timeout(node_p node, hook_p hook, voi
 	struct mbuf *m;
 	u_int delay;
 
-	/* Make sure callout is still active before doing anything */
-	if (callout_pending(&seq->rack_timer) ||
-	    (!callout_active(&seq->rack_timer)))
-		return;
-
 	/* Sanity check */
 	L2TP_SEQ_CHECK(seq);
 
 	mtx_lock(&seq->mtx);
+	/* Make sure callout is still active before doing anything */
+	if (callout_pending(&seq->rack_timer) ||
+	    !callout_active(&seq->rack_timer)) {
+		mtx_unlock(&seq->mtx);
+		return;
+	}
+
 	priv->stats.xmitRetransmits++;
 
 	/* Have we reached the retransmit limit? If so, notify owner. */


More information about the svn-src-stable mailing list