From owner-svn-src-all@FreeBSD.ORG Fri Aug 17 05:51:46 2012 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 EE9F6106566C; Fri, 17 Aug 2012 05:51:46 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9B558FC14; Fri, 17 Aug 2012 05:51:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7H5pkN6025310; Fri, 17 Aug 2012 05:51:46 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7H5pkd1025308; Fri, 17 Aug 2012 05:51:46 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201208170551.q7H5pkd1025308@svn.freebsd.org> From: Randall Stewart Date: Fri, 17 Aug 2012 05:51:46 +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: r239353 - head/sys/netinet 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: Fri, 17 Aug 2012 05:51:47 -0000 Author: rrs Date: Fri Aug 17 05:51:46 2012 New Revision: 239353 URL: http://svn.freebsd.org/changeset/base/239353 Log: Ok jhb, lets move the ifa_free() down to the bottom to assure that *all* tables and such are removed before we start to free. This won't protect the Hash in ip_input.c but in theory should protect any other uses that *do* use locks. MFC after: 1 week (or more) Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Fri Aug 17 05:02:29 2012 (r239352) +++ head/sys/netinet/in.c Fri Aug 17 05:51:46 2012 (r239353) @@ -573,7 +573,6 @@ in_control(struct socket *so, u_long cmd } TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link); IF_ADDR_WUNLOCK(ifp); -/* ifa_free(&ia->ia_ifa); - Double free?? */ /* if_addrhead */ IN_IFADDR_WLOCK(); TAILQ_REMOVE(&V_in_ifaddrhead, ia, ia_link); @@ -597,6 +596,7 @@ in_control(struct socket *so, u_long cmd } else ifa_free(&iap->ia_ifa); + ifa_free(&ia->ia_ifa); /* if_addrhead */ ifa_free(&ia->ia_ifa); /* in_ifaddrhead */ out: if (ia != NULL)