svn commit: r283651 - projects/ifnet/sys/net

Gleb Smirnoff glebius at FreeBSD.org
Thu May 28 16:16:30 UTC 2015


Author: glebius
Date: Thu May 28 16:16:29 2015
New Revision: 283651
URL: https://svnweb.freebsd.org/changeset/base/283651

Log:
  Destroy if_lock later in interface destroy sequence.
  
  Submitted by:	Tiwei Bie <btw mail.ustc.edu.cn>

Modified:
  projects/ifnet/sys/net/if.c

Modified: projects/ifnet/sys/net/if.c
==============================================================================
--- projects/ifnet/sys/net/if.c	Thu May 28 16:00:23 2015	(r283650)
+++ projects/ifnet/sys/net/if.c	Thu May 28 16:16:29 2015	(r283651)
@@ -672,7 +672,6 @@ if_free_internal(struct ifnet *ifp)
 	if (ifp->if_description != NULL)
 		free(ifp->if_description, M_IFDESCR);
 	IF_AFDATA_DESTROY(ifp);
-	rw_destroy(&ifp->if_lock);
 	if (ifp->if_snd)
 		if_snd_free(ifp->if_snd);
 
@@ -684,6 +683,7 @@ if_free_internal(struct ifnet *ifp)
 
 	ifmedia_free(ifp);
 
+	rw_destroy(&ifp->if_lock);
 	free(ifp, M_IFNET);
 }
 


More information about the svn-src-projects mailing list