mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Greatly simplify the unlocking logic by holding the TCP protocol lock until
after FIN_WAIT_2 processing. Helped with debugging: Doug Barton
This commit is contained in:
parent
be074a2dd8
commit
7792ea2700
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112191
@ -995,7 +995,6 @@ tcp_input(m, off0)
|
||||
!SEQ_LT(tp->snd_una, tp->snd_recover)))) {
|
||||
KASSERT(headlocked, ("headlocked"));
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
headlocked = 0;
|
||||
/*
|
||||
* this is a pure ack for outstanding data.
|
||||
*/
|
||||
@ -1075,7 +1074,6 @@ tcp_input(m, off0)
|
||||
tlen <= sbspace(&so->so_rcv)) {
|
||||
KASSERT(headlocked, ("headlocked"));
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
headlocked = 0;
|
||||
/*
|
||||
* this is a pure, in-sequence data packet
|
||||
* with nothing on the reassembly queue and
|
||||
@ -2097,10 +2095,6 @@ tcp_input(m, off0)
|
||||
}
|
||||
dodata: /* XXX */
|
||||
KASSERT(headlocked, ("headlocked"));
|
||||
if (!(thflags & TH_FIN && tp->t_state == TCPS_FIN_WAIT_2)) {
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
headlocked = 0;
|
||||
}
|
||||
/*
|
||||
* Process the segment text, merging it into the TCP sequencing queue,
|
||||
* and arranging for acknowledgment of receipt if necessary.
|
||||
@ -2219,6 +2213,7 @@ tcp_input(m, off0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
#ifdef TCPDEBUG
|
||||
if (so->so_options & SO_DEBUG)
|
||||
tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen,
|
||||
@ -2230,14 +2225,13 @@ tcp_input(m, off0)
|
||||
*/
|
||||
if (needoutput || (tp->t_flags & TF_ACKNOW))
|
||||
(void) tcp_output(tp);
|
||||
|
||||
check_delack:
|
||||
if (tp->t_flags & TF_DELACK) {
|
||||
tp->t_flags &= ~TF_DELACK;
|
||||
callout_reset(tp->tt_delack, tcp_delacktime,
|
||||
tcp_timer_delack, tp);
|
||||
}
|
||||
if (headlocked)
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
INP_UNLOCK(inp);
|
||||
return;
|
||||
|
||||
|
@ -995,7 +995,6 @@ tcp_input(m, off0)
|
||||
!SEQ_LT(tp->snd_una, tp->snd_recover)))) {
|
||||
KASSERT(headlocked, ("headlocked"));
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
headlocked = 0;
|
||||
/*
|
||||
* this is a pure ack for outstanding data.
|
||||
*/
|
||||
@ -1075,7 +1074,6 @@ tcp_input(m, off0)
|
||||
tlen <= sbspace(&so->so_rcv)) {
|
||||
KASSERT(headlocked, ("headlocked"));
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
headlocked = 0;
|
||||
/*
|
||||
* this is a pure, in-sequence data packet
|
||||
* with nothing on the reassembly queue and
|
||||
@ -2097,10 +2095,6 @@ tcp_input(m, off0)
|
||||
}
|
||||
dodata: /* XXX */
|
||||
KASSERT(headlocked, ("headlocked"));
|
||||
if (!(thflags & TH_FIN && tp->t_state == TCPS_FIN_WAIT_2)) {
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
headlocked = 0;
|
||||
}
|
||||
/*
|
||||
* Process the segment text, merging it into the TCP sequencing queue,
|
||||
* and arranging for acknowledgment of receipt if necessary.
|
||||
@ -2219,6 +2213,7 @@ tcp_input(m, off0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
#ifdef TCPDEBUG
|
||||
if (so->so_options & SO_DEBUG)
|
||||
tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen,
|
||||
@ -2230,14 +2225,13 @@ tcp_input(m, off0)
|
||||
*/
|
||||
if (needoutput || (tp->t_flags & TF_ACKNOW))
|
||||
(void) tcp_output(tp);
|
||||
|
||||
check_delack:
|
||||
if (tp->t_flags & TF_DELACK) {
|
||||
tp->t_flags &= ~TF_DELACK;
|
||||
callout_reset(tp->tt_delack, tcp_delacktime,
|
||||
tcp_timer_delack, tp);
|
||||
}
|
||||
if (headlocked)
|
||||
INP_INFO_WUNLOCK(&tcbinfo);
|
||||
INP_UNLOCK(inp);
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user