Author: glebius Date: Wed Jan 15 03:35:57 2020 New Revision: 356749 URL: https://svnweb.freebsd.org/changeset/base/356749
Log: Netgraph queue processing thread must process all its items in the network epoch. Reported by: Michael Zhilin <mizhka@ > Modified: head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Wed Jan 15 03:34:21 2020 (r356748) +++ head/sys/netgraph/ng_base.c Wed Jan 15 03:35:57 2020 (r356749) @@ -55,6 +55,7 @@ #include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/proc.h> +#include <sys/epoch.h> #include <sys/queue.h> #include <sys/refcount.h> #include <sys/rwlock.h> @@ -3398,6 +3399,7 @@ static void ngthread(void *arg) { for (;;) { + struct epoch_tracker et; node_p node; /* Get node from the worklist. */ @@ -3418,6 +3420,7 @@ ngthread(void *arg) * that lets us be sure that the node still exists. * Let the reference go at the last minute. */ + NET_EPOCH_ENTER(et); for (;;) { item_p item; int rw; @@ -3435,6 +3438,7 @@ ngthread(void *arg) NG_NODE_UNREF(node); } } + NET_EPOCH_EXIT(et); NG_NODE_UNREF(node); CURVNET_RESTORE(); } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"