From owner-svn-src-user@FreeBSD.ORG Fri Jun 26 02:27:58 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56BE6106564A; Fri, 26 Jun 2009 02:27:58 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4583F8FC15; Fri, 26 Jun 2009 02:27:58 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5Q2Rwaa071873; Fri, 26 Jun 2009 02:27:58 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5Q2Rw5J071871; Fri, 26 Jun 2009 02:27:58 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906260227.n5Q2Rw5J071871@svn.freebsd.org> From: Kip Macy Date: Fri, 26 Jun 2009 02:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195032 - user/kmacy/releng_7_2_fcs/sys/net X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2009 02:27:58 -0000 Author: kmacy Date: Fri Jun 26 02:27:57 2009 New Revision: 195032 URL: http://svn.freebsd.org/changeset/base/195032 Log: allow for losing a race with RT_REMREF Modified: user/kmacy/releng_7_2_fcs/sys/net/route.c Modified: user/kmacy/releng_7_2_fcs/sys/net/route.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/net/route.c Fri Jun 26 01:42:41 2009 (r195031) +++ user/kmacy/releng_7_2_fcs/sys/net/route.c Fri Jun 26 02:27:57 2009 (r195032) @@ -348,8 +348,7 @@ rtfree(struct rtentry *rt) * The callers should use RTFREE_LOCKED() or RTFREE(), so * we should come here exactly with the last reference. */ - RT_REMREF(rt); - if (rt->rt_refcnt > 0) { + if (rt->rt_refcnt > 1) { log(LOG_DEBUG, "%s: %p has %d refs\n", __func__, rt, rt->rt_refcnt); goto done; } @@ -363,7 +362,7 @@ rtfree(struct rtentry *rt) * typically calls rtexpunge which clears the RTF_UP flag * on the entry so that the code below reclaims the storage. */ - if (rt->rt_refcnt == 0 && rnh->rnh_close) + if (rt->rt_refcnt == 1 && rnh->rnh_close) rnh->rnh_close((struct radix_node *)rt, rnh); /*