From 8f27f4e5dca630fe1fa02b6ee147e1af1074b30f Mon Sep 17 00:00:00 2001 From: Markus Pfeiffer Date: Sat, 24 Feb 2018 14:11:06 +0000 Subject: [PATCH] kernel/netgraph7: Fix panic We just unset the M_HASH flag for the mbuf before queueing the message to the netisr, making sure the handler doesn't run on the wrong CPU. --- sys/netgraph7/iface/ng_iface.c | 1 + sys/netgraph7/ng_ip_input.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/netgraph7/iface/ng_iface.c b/sys/netgraph7/iface/ng_iface.c index 5744678022..a8c7cf1547 100644 --- a/sys/netgraph7/iface/ng_iface.c +++ b/sys/netgraph7/iface/ng_iface.c @@ -818,6 +818,7 @@ ng_iface_rcvdata(hook_p hook, item_p item) if (harvest.point_to_point) random_harvest(m, 16, 3, 0, RANDOM_NET); #endif + m->m_flags &= ~M_HASH; netisr_queue(isr, m); return (0); } diff --git a/sys/netgraph7/ng_ip_input.c b/sys/netgraph7/ng_ip_input.c index df5b9874d7..5de2350abf 100644 --- a/sys/netgraph7/ng_ip_input.c +++ b/sys/netgraph7/ng_ip_input.c @@ -121,6 +121,7 @@ ngipi_rcvdata(hook_p hook, item_p item) NGI_GET_M(item, m); NG_FREE_ITEM(item); + m->m_flags &= ~M_HASH; netisr_queue(NETISR_IP, m); return 0; } -- 2.41.0