From owner-svn-src-all@FreeBSD.ORG Wed Mar 18 14:36:50 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 22BEB106566B; Wed, 18 Mar 2009 14:36:50 +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 E94768FC1A; Wed, 18 Mar 2009 14:36:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2IEanfx028926; Wed, 18 Mar 2009 14:36:49 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2IEanvr028924; Wed, 18 Mar 2009 14:36:49 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200903181436.n2IEanvr028924@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 18 Mar 2009 14:36:49 +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: r189964 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netinet 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: Wed, 18 Mar 2009 14:36:50 -0000 Author: bz Date: Wed Mar 18 14:36:49 2009 New Revision: 189964 URL: http://svn.freebsd.org/changeset/base/189964 Log: MFC r185333: Unify the v4 and v6 versions of pcbdetach and pcbfree as good as possible so that they are easily diffable. No functional changes. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netinet/in_pcb.c stable/7/sys/netinet6/in6_pcb.c Modified: stable/7/sys/netinet/in_pcb.c ============================================================================== --- stable/7/sys/netinet/in_pcb.c Wed Mar 18 14:33:10 2009 (r189963) +++ stable/7/sys/netinet/in_pcb.c Wed Mar 18 14:36:49 2009 (r189964) @@ -880,7 +880,7 @@ void in_pcbdetach(struct inpcb *inp) { - KASSERT(inp->inp_socket != NULL, ("in_pcbdetach: inp_socket == NULL")); + KASSERT(inp->inp_socket != NULL, ("%s: inp_socket == NULL", __func__)); inp->inp_socket->so_pcb = NULL; inp->inp_socket = NULL; @@ -895,14 +895,14 @@ in_pcbfree(struct inpcb *inp) { struct inpcbinfo *ipi = inp->inp_pcbinfo; - KASSERT(inp->inp_socket == NULL, ("in_pcbfree: inp_socket != NULL")); + KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); INP_INFO_WLOCK_ASSERT(ipi); INP_WLOCK_ASSERT(inp); #ifdef IPSEC ipsec4_delete_pcbpolicy(inp); -#endif /*IPSEC*/ +#endif /* IPSEC */ inp->inp_gencnt = ++ipi->ipi_gencnt; in_pcbremlists(inp); if (inp->inp_options) Modified: stable/7/sys/netinet6/in6_pcb.c ============================================================================== --- stable/7/sys/netinet6/in6_pcb.c Wed Mar 18 14:33:10 2009 (r189963) +++ stable/7/sys/netinet6/in6_pcb.c Wed Mar 18 14:36:49 2009 (r189964) @@ -416,7 +416,8 @@ void in6_pcbdetach(struct inpcb *inp) { - KASSERT(inp->inp_socket != NULL, ("in6_pcbdetach: inp_socket == NULL")); + KASSERT(inp->inp_socket != NULL, ("%s: inp_socket == NULL", __func__)); + inp->inp_socket->so_pcb = NULL; inp->inp_socket = NULL; } @@ -426,8 +427,9 @@ in6_pcbfree(struct inpcb *inp) { struct inpcbinfo *ipi = inp->inp_pcbinfo; - KASSERT(inp->inp_socket == NULL, ("in6_pcbfree: inp_socket != NULL")); - INP_INFO_WLOCK_ASSERT(inp->inp_pcbinfo); + KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); + + INP_INFO_WLOCK_ASSERT(ipi); INP_WLOCK_ASSERT(inp); #ifdef IPSEC @@ -445,6 +447,7 @@ in6_pcbfree(struct inpcb *inp) inp_freemoptions(inp->inp_moptions); inp->inp_vflag = 0; crfree(inp->inp_cred); + #ifdef MAC mac_destroy_inpcb(inp); #endif