svn commit: r207011 - stable/8/sys/net
Bjoern A. Zeeb
bz at FreeBSD.org
Wed Apr 21 19:47:19 UTC 2010
Author: bz
Date: Wed Apr 21 19:47:19 2010
New Revision: 207011
URL: http://svn.freebsd.org/changeset/base/207011
Log:
MFC r206469:
In if_detach_internal() only try to do the detach run if if_attachdomain1()
has actually succeeded to initialize and attach. There is a theoretical
possibility to drop out early in if_attachdomain1() leaving the array
uninitialized if we cannot get the lock.
Discussed with: rwatson
Modified:
stable/8/sys/net/if.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
stable/8/sys/geom/sched/ (props changed)
Modified: stable/8/sys/net/if.c
==============================================================================
--- stable/8/sys/net/if.c Wed Apr 21 19:45:41 2010 (r207010)
+++ stable/8/sys/net/if.c Wed Apr 21 19:47:19 2010 (r207011)
@@ -931,7 +931,7 @@ if_detach_internal(struct ifnet *ifp, in
if_delgroups(ifp);
IF_AFDATA_LOCK(ifp);
- for (dp = domains; dp; dp = dp->dom_next) {
+ for (dp = domains; ifp->if_afdata_initialized > 0 && dp; dp = dp->dom_next) {
if (dp->dom_ifdetach && ifp->if_afdata[dp->dom_family])
(*dp->dom_ifdetach)(ifp,
ifp->if_afdata[dp->dom_family]);
More information about the svn-src-stable
mailing list