summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2012-07-22 17:31:36 +0000
committerrwatson <rwatson@FreeBSD.org>2012-07-22 17:31:36 +0000
commitbb5e5ce48adff96a77aaed79b7337c661bc47f5f (patch)
treea0a93be0d759ec23e42ac55fb669112b8cb17b78 /sys/netinet/tcp_input.c
parente2ca2cfba28c2182ce885d8173b5411ce7727792 (diff)
downloadFreeBSD-src-bb5e5ce48adff96a77aaed79b7337c661bc47f5f.zip
FreeBSD-src-bb5e5ce48adff96a77aaed79b7337c661bc47f5f.tar.gz
Update some stale comments regarding tcbinfo locking in the TCP input
path: read locks on tcbinfo are no longer used, so won't happen. No functional change. MFC after: 3 days
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 6d8ebee..1840b08 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -909,7 +909,7 @@ findpcb:
/*
* A previous connection in TIMEWAIT state is supposed to catch stray
* or duplicate segments arriving late. If this segment was a
- * legitimate new connection attempt the old INPCB gets removed and
+ * legitimate new connection attempt, the old INPCB gets removed and
* we can try again to find a listening socket.
*
* At this point, due to earlier optimism, we may hold only an inpcb
@@ -1438,15 +1438,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
/*
* If this is either a state-changing packet or current state isn't
* established, we require a write lock on tcbinfo. Otherwise, we
- * allow either a read lock or a write lock, as we may have acquired
- * a write lock due to a race.
- *
- * Require a global write lock for SYN/FIN/RST segments or
- * non-established connections; otherwise accept either a read or
- * write lock, as we may have conservatively acquired a write lock in
- * certain cases in tcp_input() (is this still true?). Currently we
- * will never enter with no lock, so we try to drop it quickly in the
- * common pure ack/pure data cases.
+ * allow the tcbinfo to be in either alocked or unlocked, as the
+ * caller may have unnecessarily acquired a write lock due to a race.
*/
if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0 ||
tp->t_state != TCPS_ESTABLISHED) {
OpenPOWER on IntegriCloud