From 67da1f3d8d5cb490e8991f75c302fb892ee355bd Mon Sep 17 00:00:00 2001 From: Marko Zec Date: Fri, 22 May 2009 22:22:21 +0000 Subject: [PATCH] Set ifp->if_afdata_initialized to 0 while holding IF_AFDATA_LOCK on ifp, not after the lock has been released. Reviewed by: bz Discussed with: rwatson --- sys/net/if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if.c b/sys/net/if.c index fea9db77416..7248768439c 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1022,8 +1022,8 @@ if_detach_internal(struct ifnet *ifp, int vmove) (*dp->dom_ifdetach)(ifp, ifp->if_afdata[dp->dom_family]); } - IF_AFDATA_UNLOCK(ifp); ifp->if_afdata_initialized = 0; + IF_AFDATA_UNLOCK(ifp); if (!vmove) ifq_detach(&ifp->if_snd);