svn commit: r242603 - in user/andre/tcp_workqueue/sys: kern netinet

Andre Oppermann andre at FreeBSD.org
Mon Nov 5 09:26:28 UTC 2012


Author: andre
Date: Mon Nov  5 09:26:27 2012
New Revision: 242603
URL: http://svnweb.freebsd.org/changeset/base/242603

Log:
  Annotate possible socket locking issues for investigation.

Modified:
  user/andre/tcp_workqueue/sys/kern/uipc_socket.c
  user/andre/tcp_workqueue/sys/netinet/tcp_input.c
  user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c

Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c
==============================================================================
--- user/andre/tcp_workqueue/sys/kern/uipc_socket.c	Mon Nov  5 09:23:21 2012	(r242602)
+++ user/andre/tcp_workqueue/sys/kern/uipc_socket.c	Mon Nov  5 09:26:27 2012	(r242603)
@@ -519,6 +519,7 @@ sonewconn(struct socket *head, int conns
 		    __func__, head->so_pcb);
 		return (NULL);
 	}
+	/* XXXAO: "so" is not locked. */
 	if ((head->so_options & SO_ACCEPTFILTER) != 0)
 		connstatus = 0;
 	so->so_head = head;

Modified: user/andre/tcp_workqueue/sys/netinet/tcp_input.c
==============================================================================
--- user/andre/tcp_workqueue/sys/netinet/tcp_input.c	Mon Nov  5 09:23:21 2012	(r242602)
+++ user/andre/tcp_workqueue/sys/netinet/tcp_input.c	Mon Nov  5 09:26:27 2012	(r242603)
@@ -1034,6 +1034,8 @@ relocked:
 	 * attempt or the completion of a previous one.  Because listen
 	 * sockets are never in TCPS_ESTABLISHED, the V_tcbinfo lock will be
 	 * held in this case.
+	 *
+	 * XXXAO: "so" is not locked!
 	 */
 	if (so->so_options & SO_ACCEPTCONN) {
 		struct in_conninfo inc;

Modified: user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c
==============================================================================
--- user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c	Mon Nov  5 09:23:21 2012	(r242602)
+++ user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c	Mon Nov  5 09:26:27 2012	(r242603)
@@ -642,6 +642,8 @@ done:
 
 /*
  * Build a new TCP socket structure from a syncache entry.
+ *
+ * XXXAO: Neither "lso" nor "so" is locked!
  */
 static struct socket *
 syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m)
@@ -907,6 +909,8 @@ abort2:
  * in the syncache, and if its there, we pull it out of
  * the cache and turn it into a full-blown connection in
  * the SYN-RECEIVED state.
+ *
+ * XXXAO: Neither "lso" nor "lsop" is locked!
  */
 int
 syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th,


More information about the svn-src-user mailing list