From owner-svn-src-head@FreeBSD.ORG Tue Mar 4 05:09:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE2AF583; Tue, 4 Mar 2014 05:09:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9B5A6EBB; Tue, 4 Mar 2014 05:09:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2459lRQ017312; Tue, 4 Mar 2014 05:09:47 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2459lou017310; Tue, 4 Mar 2014 05:09:47 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201403040509.s2459lou017310@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 4 Mar 2014 05:09:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262727 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 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: Tue, 04 Mar 2014 05:09:47 -0000 Author: gnn Date: Tue Mar 4 05:09:46 2014 New Revision: 262727 URL: http://svnweb.freebsd.org/changeset/base/262727 Log: Naming consistency fix. The routing code defines RADIX_NODE_HEAD_LOCK as grabbing the write lock, but RADIX_NODE_HEAD_LOCK_ASSERT as checking the read lock. Submitted by: Vijay Singh MFC after: 1 month Modified: head/sys/net/radix.h head/sys/net/route.c Modified: head/sys/net/radix.h ============================================================================== --- head/sys/net/radix.h Tue Mar 4 03:19:36 2014 (r262726) +++ head/sys/net/radix.h Tue Mar 4 05:09:46 2014 (r262727) @@ -149,7 +149,8 @@ struct radix_node_head { #define RADIX_NODE_HEAD_DESTROY(rnh) rw_destroy(&(rnh)->rnh_lock) -#define RADIX_NODE_HEAD_LOCK_ASSERT(rnh) rw_assert(&(rnh)->rnh_lock, RA_LOCKED) +#define RADIX_NODE_HEAD_LOCK_ASSERT(rnh) rw_assert(&(rnh)->rnh_lock, RA_WLOCKED) +#define RADIX_NODE_HEAD_RLOCK_ASSERT(rnh) rw_assert(&(rnh)->rnh_lock, RA_RLOCKED) #define RADIX_NODE_HEAD_WLOCK_ASSERT(rnh) rw_assert(&(rnh)->rnh_lock, RA_WLOCKED) #endif /* _KERNEL */ Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Tue Mar 4 03:19:36 2014 (r262726) +++ head/sys/net/route.c Tue Mar 4 05:09:46 2014 (r262727) @@ -381,7 +381,7 @@ rtalloc1_fib(struct sockaddr *dst, int r RADIX_NODE_HEAD_RLOCK(rnh); #ifdef INVARIANTS else - RADIX_NODE_HEAD_LOCK_ASSERT(rnh); + RADIX_NODE_HEAD_RLOCK_ASSERT(rnh); #endif rn = rnh->rnh_matchaddr(dst, rnh); if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) { @@ -1000,9 +1000,10 @@ rn_mpath_update(int req, struct rt_addri * a matching RTAX_GATEWAY. */ struct rtentry *rt, *rto = NULL; - register struct radix_node *rn; + struct radix_node *rn; int error = 0; + RADIX_NODE_HEAD_LOCK_ASSERT(rnh); rn = rnh->rnh_lookup(dst, netmask, rnh); if (rn == NULL) return (ESRCH);