summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorzec <zec@FreeBSD.org>2009-05-22 22:22:21 +0000
committerzec <zec@FreeBSD.org>2009-05-22 22:22:21 +0000
commitce69980b94cf6931a114fe20212172fcf84e67f0 (patch)
treecccf6cc901fc82f3dddb54ccc03fe2ac37034b30 /sys/net/if.c
parent8cffa3fe2185a49f39e8cb01809ca741187ea474 (diff)
downloadFreeBSD-src-ce69980b94cf6931a114fe20212172fcf84e67f0.zip
FreeBSD-src-ce69980b94cf6931a114fe20212172fcf84e67f0.tar.gz
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
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index fea9db7..7248768 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);
OpenPOWER on IntegriCloud