From owner-svn-src-all@FreeBSD.ORG Sat Jun 12 15:42:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 640F4106566B; Sat, 12 Jun 2010 15:42:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 533478FC08; Sat, 12 Jun 2010 15:42:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5CFgsfl041674; Sat, 12 Jun 2010 15:42:54 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5CFgsKB041672; Sat, 12 Jun 2010 15:42:54 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201006121542.o5CFgsKB041672@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 12 Jun 2010 15:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209108 - stable/7/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2010 15:42:54 -0000 Author: bz Date: Sat Jun 12 15:42:54 2010 New Revision: 209108 URL: http://svn.freebsd.org/changeset/base/209108 Log: "MFC" (parts of) r185849: Fix a locking issue triggering an assertion in rt_setgate() via arp_rtrequest() due to no radix node head (rnh) lock held in case of a route change. The previous MFC in r189026 left out this hunk. Reported by: Haven Hash (haven.hash isilon.com) Tested by: Haven Hash (haven.hash isilon.com) PR: kern/147767 Modified: stable/7/sys/net/rtsock.c Modified: stable/7/sys/net/rtsock.c ============================================================================== --- stable/7/sys/net/rtsock.c Sat Jun 12 15:13:36 2010 (r209107) +++ stable/7/sys/net/rtsock.c Sat Jun 12 15:42:54 2010 (r209108) @@ -672,8 +672,13 @@ route_output(struct mbuf *m, struct sock rt_setmetrics(rtm->rtm_inits, &rtm->rtm_rmx, &rt->rt_rmx); rtm->rtm_index = rt->rt_ifp->if_index; - if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest) - rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt, &info); + if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest) { + RT_UNLOCK(rt); + RADIX_NODE_HEAD_LOCK(rnh); + RT_LOCK(rt); + rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt, &info); + RADIX_NODE_HEAD_UNLOCK(rnh); + } if (info.rti_info[RTAX_GENMASK]) rt->rt_genmask = info.rti_info[RTAX_GENMASK]; /* FALLTHROUGH */