From owner-p4-projects@FreeBSD.ORG Wed Oct 29 17:53:22 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 126A716A4D0; Wed, 29 Oct 2003 17:53:22 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD5D716A4CE for ; Wed, 29 Oct 2003 17:53:21 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BC6B43FB1 for ; Wed, 29 Oct 2003 17:53:21 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9U1rKXJ077729 for ; Wed, 29 Oct 2003 17:53:21 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9U1rKoT077726 for perforce@freebsd.org; Wed, 29 Oct 2003 17:53:20 -0800 (PST) (envelope-from sam@freebsd.org) Date: Wed, 29 Oct 2003 17:53:20 -0800 (PST) Message-Id: <200310300153.h9U1rKoT077726@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 40793 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2003 01:53:22 -0000 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 */