Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Oct 2003 17:53:20 -0800 (PST)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 40793 for review
Message-ID:  <200310300153.h9U1rKoT077726@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=40793

Change 40793 by sam@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
 	 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310300153.h9U1rKoT077726>