PERFORCE change 162045 for review

Marko Zec zec at FreeBSD.org
Wed May 13 23:32:12 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=162045

Change 162045 by zec at zec_tpx32 on 2009/05/13 23:31:15

	if_free_internal() is called with ifp->if_vnet already set to
	NULL, so instead of fetching the vnet context from ifp->if_vnet,
	resort to curvnet instead.
	
	This unbreaks ifconfig destroy operations on cloning ifnets
	with options VIMAGE builds.

Affected files ...

.. //depot/projects/vimage-commit2/src/sys/net/if.c#59 edit

Differences ...

==== //depot/projects/vimage-commit2/src/sys/net/if.c#59 (text+ko) ====

@@ -545,7 +545,7 @@
 static void
 if_free_internal(struct ifnet *ifp)
 {
-	INIT_VNET_NET(ifp->if_vnet);
+	INIT_VNET_NET(curvnet);		/* ifp->if_vnet is already NULL here */
 
 	KASSERT((ifp->if_flags & IFF_DYING),
 	    ("if_free_internal: interface not dying"));


More information about the p4-projects mailing list