From e9dc46cc30fbd511e5d1497ac15ecb04f2a83ec9 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Tue, 8 Oct 2019 16:45:56 +0000 Subject: [PATCH] In DIAGNOSTIC block of if_delmulti_ifma_flags() enter the network epoch. This quickly plugs the regression from r353292. The locking of multicast definitely needs a broader review today... Reported by: pho, dhw --- sys/net/if.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 089a481c3b1..956b933774e 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -3689,13 +3689,14 @@ if_delmulti_ifma_flags(struct ifmultiaddr *ifma, int flags) if (ifp == NULL) { printf("%s: ifma_ifp seems to be detached\n", __func__); } else { + struct epoch_tracker et; struct ifnet *oifp; - NET_EPOCH_ASSERT(); - + NET_EPOCH_ENTER(et); CK_STAILQ_FOREACH(oifp, &V_ifnet, if_link) if (ifp == oifp) break; + NET_EPOCH_EXIT(et); if (ifp != oifp) ifp = NULL; }