summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authorhsu <hsu@FreeBSD.org>2002-12-20 00:24:19 +0000
committerhsu <hsu@FreeBSD.org>2002-12-20 00:24:19 +0000
commit93c339304633b5ad378709d555b7c1ee41c842c0 (patch)
treec3cbacc48e299998611b921694d9affe3f8f7b86 /sys/netinet/tcp_syncache.c
parent47650e6e2e8ec97e4fae89e7fa8d452d2ded3086 (diff)
downloadFreeBSD-src-93c339304633b5ad378709d555b7c1ee41c842c0.zip
FreeBSD-src-93c339304633b5ad378709d555b7c1ee41c842c0.tar.gz
Expand scope of TCP protocol lock to cover syncache data structures.
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 772713c..5c647e3 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -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);
}
OpenPOWER on IntegriCloud