Expand scope of TCP protocol lock to cover syncache data structures.

This commit is contained in:
hsu 2002-12-20 00:24:19 +00:00
parent 47650e6e2e
commit 93c3393046

View File

@ -369,15 +369,16 @@ syncache_timer(xslot)
int s;
s = splnet();
INP_INFO_RLOCK(&tcbinfo);
if (callout_pending(&tcp_syncache.tt_timerq[slot]) ||
!callout_active(&tcp_syncache.tt_timerq[slot])) {
INP_INFO_RUNLOCK(&tcbinfo);
splx(s);
return;
}
callout_deactivate(&tcp_syncache.tt_timerq[slot]);
nsc = TAILQ_FIRST(&tcp_syncache.timerq[slot]);
INP_INFO_RLOCK(&tcbinfo);
while (nsc != NULL) {
if (ticks < nsc->sc_rxttime)
break;
@ -405,10 +406,10 @@ syncache_timer(xslot)
TAILQ_REMOVE(&tcp_syncache.timerq[slot], sc, sc_timerq);
SYNCACHE_TIMEOUT(sc, slot + 1);
}
INP_INFO_RUNLOCK(&tcbinfo);
if (nsc != NULL)
callout_reset(&tcp_syncache.tt_timerq[slot],
nsc->sc_rxttime - ticks, syncache_timer, (void *)(slot));
INP_INFO_RUNLOCK(&tcbinfo);
splx(s);
}