svn commit: r356977 - head/sys/netinet

Gleb Smirnoff glebius at FreeBSD.org
Wed Jan 22 05:58:30 UTC 2020


Author: glebius
Date: Wed Jan 22 05:58:29 2020
New Revision: 356977
URL: https://svnweb.freebsd.org/changeset/base/356977

Log:
  Relax locking requirements for in_pcballoc().  All pcbinfo fields
  modified by this function are protected by the PCB list lock that is
  acquired inside the function.
  
  This could have been done even before epoch changes, after r286227.

Modified:
  head/sys/netinet/in_pcb.c

Modified: head/sys/netinet/in_pcb.c
==============================================================================
--- head/sys/netinet/in_pcb.c	Wed Jan 22 05:54:58 2020	(r356976)
+++ head/sys/netinet/in_pcb.c	Wed Jan 22 05:58:29 2020	(r356977)
@@ -512,14 +512,6 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbin
 	struct inpcb *inp;
 	int error;
 
-#ifdef INVARIANTS
-	if (pcbinfo == &V_tcbinfo) {
-		NET_EPOCH_ASSERT();
-	} else {
-		INP_INFO_WLOCK_ASSERT(pcbinfo);
-	}
-#endif
-
 	error = 0;
 	inp = uma_zalloc(pcbinfo->ipi_zone, M_NOWAIT);
 	if (inp == NULL)


More information about the svn-src-all mailing list