summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2005-06-01 11:49:14 +0000
committerRobert Watson <rwatson@FreeBSD.org>2005-06-01 11:49:14 +0000
commit416738a781e0e204ddd455fb43622b620ad5e735 (patch)
tree7b5b438e52cf3e55e55487ac032bb359a795de2b
parent7609aad7d9f6030a50c7061e79c30fb1edb52ca8 (diff)
Notes
-rw-r--r--sys/netinet/tcp_input.c11
-rw-r--r--sys/netinet/tcp_reass.c11
2 files changed, 22 insertions, 0 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index cbd40689732c..739261025cb0 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1539,11 +1539,16 @@ trimthenstep6:
close:
tp->t_state = TCPS_CLOSED;
tcpstat.tcps_drops++;
+ KASSERT(headlocked, ("tcp_input: "
+ "trimthenstep6: tcp_close: head not "
+ "locked"));
tp = tcp_close(tp);
break;
case TCPS_CLOSING:
case TCPS_LAST_ACK:
+ KASSERT(headlocked, ("trimthenstep6: "
+ "tcp_close.2: head not locked"));
tp = tcp_close(tp);
break;
@@ -1651,6 +1656,8 @@ trimthenstep6:
*/
if ((so->so_state & SS_NOFDREF) &&
tp->t_state > TCPS_CLOSE_WAIT && tlen) {
+ KASSERT(headlocked, ("trimthenstep6: tcp_close.3: head not "
+ "locked"));
tp = tcp_close(tp);
tcpstat.tcps_rcvafterclose++;
rstreason = BANDLIM_UNLIMITED;
@@ -1676,6 +1683,8 @@ trimthenstep6:
if (thflags & TH_SYN &&
tp->t_state == TCPS_TIME_WAIT &&
SEQ_GT(th->th_seq, tp->rcv_nxt)) {
+ KASSERT(headlocked, ("trimthenstep6: "
+ "tcp_close.4: head not locked"));
tp = tcp_close(tp);
goto findpcb;
}
@@ -2178,6 +2187,8 @@ process_ACK:
*/
case TCPS_LAST_ACK:
if (ourfinisacked) {
+ KASSERT(headlocked, ("tcp_input: process_ACK:"
+ " tcp_close: head not locked"));
tp = tcp_close(tp);
goto drop;
}
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index cbd40689732c..739261025cb0 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -1539,11 +1539,16 @@ trimthenstep6:
close:
tp->t_state = TCPS_CLOSED;
tcpstat.tcps_drops++;
+ KASSERT(headlocked, ("tcp_input: "
+ "trimthenstep6: tcp_close: head not "
+ "locked"));
tp = tcp_close(tp);
break;
case TCPS_CLOSING:
case TCPS_LAST_ACK:
+ KASSERT(headlocked, ("trimthenstep6: "
+ "tcp_close.2: head not locked"));
tp = tcp_close(tp);
break;
@@ -1651,6 +1656,8 @@ trimthenstep6:
*/
if ((so->so_state & SS_NOFDREF) &&
tp->t_state > TCPS_CLOSE_WAIT && tlen) {
+ KASSERT(headlocked, ("trimthenstep6: tcp_close.3: head not "
+ "locked"));
tp = tcp_close(tp);
tcpstat.tcps_rcvafterclose++;
rstreason = BANDLIM_UNLIMITED;
@@ -1676,6 +1683,8 @@ trimthenstep6:
if (thflags & TH_SYN &&
tp->t_state == TCPS_TIME_WAIT &&
SEQ_GT(th->th_seq, tp->rcv_nxt)) {
+ KASSERT(headlocked, ("trimthenstep6: "
+ "tcp_close.4: head not locked"));
tp = tcp_close(tp);
goto findpcb;
}
@@ -2178,6 +2187,8 @@ process_ACK:
*/
case TCPS_LAST_ACK:
if (ourfinisacked) {
+ KASSERT(headlocked, ("tcp_input: process_ACK:"
+ " tcp_close: head not locked"));
tp = tcp_close(tp);
goto drop;
}