Expand scope of TCP protocol lock to cover syncache data structures.
This commit is contained in:
parent
47650e6e2e
commit
93c3393046
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user