diff options
-rw-r--r-- | sys/netinet/tcp_syncache.c | 5 |
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); } |