PERFORCE change 40793 for review

Sam Leffler sam at FreeBSD.org
Wed Oct 29 17:53:22 PST 2003


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

Change 40793 by sam at sam_ebb on 2003/10/29 17:52:59

	It is not possible to assume anything about the number of
	held references when rtexpunge is called; remove the
	comment and associated assertion.

Affected files ...

.. //depot/projects/netperf/sys/net/route.c#22 edit

Differences ...

==== //depot/projects/netperf/sys/net/route.c#22 (text+ko) ====

@@ -536,7 +536,7 @@
 
 /*
  * Expunges references to a route that's about to be reclaimed.
- * The route must be locked and have no held references.
+ * The route must be locked.
  */
 void
 rtexpunge(struct rtentry *rt)
@@ -546,8 +546,14 @@
 	struct ifaddr *ifa;
 
 	RT_LOCK_ASSERT(rt);
-	KASSERT(rt->rt_refcnt == 0, ("bogus refcnt %ld", rt->rt_refcnt));
-
+#if 0
+	/*
+	 * We cannot assume anything about the reference count
+	 * because protocols call us in many situations; often
+	 * before unwinding references to the table entry.
+	 */
+	KASSERT(rt->rt_refcnt <= 1, ("bogus refcnt %ld", rt->rt_refcnt));
+#endif
 	/*
 	 * Find the correct routing tree to use for this Address Family
 	 */


More information about the p4-projects mailing list