From owner-svn-src-all@FreeBSD.ORG Tue Aug 25 19:04:22 2009 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 C75281065692; Tue, 25 Aug 2009 19:04:22 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BFF98FC1C; Tue, 25 Aug 2009 19:04:22 +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 n7PJ4MgP036764; Tue, 25 Aug 2009 19:04:22 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7PJ4MHP036760; Tue, 25 Aug 2009 19:04:22 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908251904.n7PJ4MHP036760@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 25 Aug 2009 19:04:22 +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: r196549 - in stable/7/sys: . contrib/pf netinet6 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: Tue, 25 Aug 2009 19:04:22 -0000 Author: bz Date: Tue Aug 25 19:04:22 2009 New Revision: 196549 URL: http://svn.freebsd.org/changeset/base/196549 Log: MFC r187946: Like with r185713 make sure to not leak a lock as rtalloc1(9) returns a locked route. Thus we have to use RTFREE_LOCKED(9) to get it unlocked and rtfree(9)d rather than just rtfree(9)d. PR: kern/129793 Submitted by: Dheeraj Reddy Originally committed from: Bugathon #6 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/netinet6/in6_gif.c stable/7/sys/netinet6/in6_ifattach.c stable/7/sys/netinet6/nd6_nbr.c Modified: stable/7/sys/netinet6/in6_gif.c ============================================================================== --- stable/7/sys/netinet6/in6_gif.c Tue Aug 25 17:00:24 2009 (r196548) +++ stable/7/sys/netinet6/in6_gif.c Tue Aug 25 19:04:22 2009 (r196549) @@ -389,10 +389,10 @@ gif_validate6(const struct ip6_hdr *ip6, ip6_sprintf(ip6buf, &sin6.sin6_addr)); #endif if (rt) - rtfree(rt); + RTFREE_LOCKED(rt); return 0; } - rtfree(rt); + RTFREE_LOCKED(rt); } return 128 * 2; Modified: stable/7/sys/netinet6/in6_ifattach.c ============================================================================== --- stable/7/sys/netinet6/in6_ifattach.c Tue Aug 25 17:00:24 2009 (r196548) +++ stable/7/sys/netinet6/in6_ifattach.c Tue Aug 25 19:04:22 2009 (r196549) @@ -767,7 +767,7 @@ in6_ifdetach(struct ifnet *ifp) if ((ia->ia_flags & IFA_ROUTE) && (rt = rtalloc1((struct sockaddr *)&ia->ia_addr, 0, 0UL))) { rtflags = rt->rt_flags; - rtfree(rt); + RTFREE_LOCKED(rt); rtrequest(RTM_DELETE, (struct sockaddr *)&ia->ia_addr, (struct sockaddr *)&ia->ia_addr, (struct sockaddr *)&ia->ia_prefixmask, Modified: stable/7/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/7/sys/netinet6/nd6_nbr.c Tue Aug 25 17:00:24 2009 (r196548) +++ stable/7/sys/netinet6/nd6_nbr.c Tue Aug 25 19:04:22 2009 (r196549) @@ -236,7 +236,7 @@ nd6_ns_input(struct mbuf *m, int off, in need_proxy = (rt && (rt->rt_flags & RTF_ANNOUNCE) != 0 && rt->rt_gateway->sa_family == AF_LINK); if (rt) - rtfree(rt); + RTFREE_LOCKED(rt); if (need_proxy) { /* * proxy NDP for single entry