Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Feb 2020 02:53:41 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r357557 - head/sys/netgraph
Message-ID:  <202002050253.0152rf06023537@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Feb  5 02:53:40 2020
New Revision: 357557
URL: https://svnweb.freebsd.org/changeset/base/357557

Log:
  netgraph(4) callouts need to be executed in the network epoch.

Modified:
  head/sys/netgraph/ng_base.c

Modified: head/sys/netgraph/ng_base.c
==============================================================================
--- head/sys/netgraph/ng_base.c	Wed Feb  5 02:30:46 2020	(r357556)
+++ head/sys/netgraph/ng_base.c	Wed Feb  5 02:53:40 2020	(r357557)
@@ -3772,11 +3772,14 @@ ng_send_fn2(node_p node, hook_p hook, item_p pitem, ng
 static void
 ng_callout_trampoline(void *arg)
 {
+	struct epoch_tracker et;
 	item_p item = arg;
 
+	NET_EPOCH_ENTER(et);
 	CURVNET_SET(NGI_NODE(item)->nd_vnet);
 	ng_snd_item(item, 0);
 	CURVNET_RESTORE();
+	NET_EPOCH_EXIT(et);
 }
 
 int



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