aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/netgraph/ng_base.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index ac9d55a6f703..092231850f18 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -3439,7 +3439,19 @@ ngthread(void *arg)
} else {
NG_QUEUE_UNLOCK(&node->nd_input_queue);
NGI_GET_NODE(item, node); /* zaps stored node */
- ng_apply_item(node, item, rw);
+
+ if ((item->el_flags & NGQF_TYPE) == NGQF_MESG) {
+ /*
+ * NGQF_MESG items should never be processed in
+ * NET_EPOCH context. So, temporary exit from EPOCH.
+ */
+ NET_EPOCH_EXIT(et);
+ ng_apply_item(node, item, rw);
+ NET_EPOCH_ENTER(et);
+ } else {
+ ng_apply_item(node, item, rw);
+ }
+
NG_NODE_UNREF(node);
}
}