[Bug 238870] sys.netpfil.pf.names.names and sys.netpfil.pf.synproxy.synproxy cause panic

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Aug 22 11:31:42 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238870

--- Comment #12 from Kristof Provost <kp at freebsd.org> ---
As an additional clue, I tried taking the IFNET_WLOCK in vnet_if_return(), and
while that's clearly too crude (if only because that's a non-sleepable lock and
we sleep during if_vmove()), but it does prevent these panics:

diff --git a/sys/net/if.c b/sys/net/if.c
index 1abb42893a0..b41a1a102cd 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -481,11 +481,13 @@ vnet_if_return(const void *unused __unused)
 {
        struct ifnet *ifp, *nifp;

+       IFNET_WLOCK();
        /* Return all inherited interfaces to their parent vnets. */
        CK_STAILQ_FOREACH_SAFE(ifp, &V_ifnet, if_link, nifp) {
                if (ifp->if_home_vnet != ifp->if_vnet)
                        if_vmove(ifp, ifp->if_home_vnet);
        }
+       IFNET_WUNLOCK();
 }
 VNET_SYSUNINIT(vnet_if_return, SI_SUB_VNET_DONE, SI_ORDER_ANY,
     vnet_if_return, NULL);

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-testing mailing list