Date: Sat, 12 Jun 2010 15:42:54 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r209108 - stable/7/sys/net Message-ID: <201006121542.o5CFgsKB041672@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006121542.o5CFgsKB041672>