PERFORCE change 81438 for review

Robert Watson rwatson at FreeBSD.org
Thu Aug 4 11:07:37 GMT 2005


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

Change 81438 by rwatson at rwatson_zoo on 2005/08/04 11:06:58

	Annotate problem with if_addr_mtx locking in the vlan code, the
	reason that I haven't yet merged thes changes.

Affected files ...

.. //depot/projects/netsmp/src/sys/net/if_vlan.c#3 edit

Differences ...

==== //depot/projects/netsmp/src/sys/net/if_vlan.c#3 (text+ko) ====

@@ -188,6 +188,15 @@
 	}
 
 	/* Now program new ones. */
+
+	/*
+	 * XXXRW: Really, this should happen in two steps, interlocked by the
+	 * vlan mutex (if any: first, the parent interface's address list
+	 * should be propagated to the softc, then from the softc to the
+	 * child, in order to avoid holding parent's and child's if_addr_mtx
+	 * at the same time.  Races can occur, but won't result in
+	 * incorrectness.  Assuming there is a vlan mutex.
+	 */
 	IF_ADDR_LOCK(ifp);
 	TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
 		if (ifma->ifma_addr->sa_family != AF_LINK)


More information about the p4-projects mailing list