From 5283630d2c9d40deb0183696d278e02644fe4326 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 9 Jul 2019 11:14:53 +0200 Subject: Update to FreeBSD stable/12 2019-07-09 Git mirror commit 3427c3416aa3c0f25124070959cca78024b94d85. --- freebsd/sys/net/if.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'freebsd/sys/net/if.c') diff --git a/freebsd/sys/net/if.c b/freebsd/sys/net/if.c index 5f0329fd..a9c28263 100644 --- a/freebsd/sys/net/if.c +++ b/freebsd/sys/net/if.c @@ -1109,6 +1109,15 @@ if_detach_internal(struct ifnet *ifp, int vmove, struct if_clone **ifcp) curvnet->vnet_ifcnt--; #endif epoch_wait_preempt(net_epoch_preempt); + + /* + * Ensure all pending EPOCH(9) callbacks have been executed. This + * fixes issues about late destruction of multicast options + * which lead to leave group calls, which in turn access the + * belonging ifnet structure: + */ + epoch_drain_callbacks(net_epoch_preempt); + /* * In any case (destroy or vmove) detach us from the groups * and remove/wait for pending events on the taskq. -- cgit v1.2.3