svn commit: r192608 - head/sys/net

Marko Zec zec at FreeBSD.org
Fri May 22 22:22:22 UTC 2009


Author: zec
Date: Fri May 22 22:22:21 2009
New Revision: 192608
URL: http://svn.freebsd.org/changeset/base/192608

Log:
  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

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Fri May 22 22:13:29 2009	(r192607)
+++ head/sys/net/if.c	Fri May 22 22:22:21 2009	(r192608)
@@ -1022,8 +1022,8 @@ if_detach_internal(struct ifnet *ifp, in
 			(*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);


More information about the svn-src-head mailing list