From owner-svn-src-head@FreeBSD.ORG Mon Feb 23 22:57:55 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AD59106564A; Mon, 23 Feb 2009 22:57:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78C8F8FC27; Mon, 23 Feb 2009 22:57:55 +0000 (UTC) (envelope-from rwatson@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 n1NMvtq1042003; Mon, 23 Feb 2009 22:57:55 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1NMvtgt042002; Mon, 23 Feb 2009 22:57:55 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200902232257.n1NMvtgt042002@svn.freebsd.org> From: Robert Watson Date: Mon, 23 Feb 2009 22:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188962 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2009 22:57:56 -0000 Author: rwatson Date: Mon Feb 23 22:57:55 2009 New Revision: 188962 URL: http://svn.freebsd.org/changeset/base/188962 Log: In in_rtqkill(), assert the radix head lock, and pass RTF_RNH_LOCKED to in_rtrequest(); the radix head lock is already acquired before rnh_walktree is called in in_rtqtimo_one(). This avoids a recursive acquisition that is no longer permitted in 8.x due to use of an rwlock for the radix head lock. Reported by: dikshie MFC after: 3 days Modified: head/sys/netinet/in_rmx.c Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Mon Feb 23 22:56:03 2009 (r188961) +++ head/sys/netinet/in_rmx.c Mon Feb 23 22:57:55 2009 (r188962) @@ -203,6 +203,8 @@ in_rtqkill(struct radix_node *rn, void * struct rtentry *rt = (struct rtentry *)rn; int err; + RADIX_NODE_HEAD_WLOCK_ASSERT(ap->rnh); + if (rt->rt_flags & RTPRF_OURS) { ap->found++; @@ -213,7 +215,8 @@ in_rtqkill(struct radix_node *rn, void * err = in_rtrequest(RTM_DELETE, (struct sockaddr *)rt_key(rt), rt->rt_gateway, rt_mask(rt), - rt->rt_flags, 0, rt->rt_fibnum); + rt->rt_flags | RTF_RNH_LOCKED, 0, + rt->rt_fibnum); if (err) { log(LOG_WARNING, "in_rtqkill: error %d\n", err); } else {