PERFORCE change 40795 for review

Sam Leffler sam at FreeBSD.org
Wed Oct 29 18:14:49 PST 2003


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

Change 40795 by sam at sam_ebb on 2003/10/29 18:14:45

	grab the tree lock before calling rtexpunge to avoid a LOR
	seen when ejecting a removable NIC

Affected files ...

.. //depot/projects/netperf/sys/netinet6/in6_ifattach.c#11 edit

Differences ...

==== //depot/projects/netperf/sys/netinet6/in6_ifattach.c#11 (text+ko) ====

@@ -904,12 +904,15 @@
 	sin6.sin6_family = AF_INET6;
 	sin6.sin6_addr = in6addr_linklocal_allnodes;
 	sin6.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
+	/* XXX grab lock first to avoid LOR */
+	RADIX_NODE_HEAD_LOCK(rt_tables[AF_INET6]);
 	rt = rtalloc1((struct sockaddr *)&sin6, 0, 0UL);
 	if (rt) {
 		if (rt->rt_ifp == ifp)
 			rtexpunge(rt);
 		RTFREE_LOCKED(rt);
 	}
+	RADIX_NODE_HEAD_UNLOCK(rt_tables[AF_INET6]);
 }
 
 void


More information about the p4-projects mailing list