svn commit: r189964 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netinet netinet6

Bjoern A. Zeeb bz at FreeBSD.org
Wed Mar 18 07:36:50 PDT 2009


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


More information about the svn-src-all mailing list