summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timer.c
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2000-09-16 00:53:53 +0000
committerjlemon <jlemon@FreeBSD.org>2000-09-16 00:53:53 +0000
commitfcb3d1e56c53e613e024c0f702a4f901cd1fc725 (patch)
treee30c79f6895b34ad213e2de0a1c0fb27b7074d66 /sys/netinet/tcp_timer.c
parent310c27a1c973657098b6327088e6764d983d77a5 (diff)
downloadFreeBSD-src-fcb3d1e56c53e613e024c0f702a4f901cd1fc725.zip
FreeBSD-src-fcb3d1e56c53e613e024c0f702a4f901cd1fc725.tar.gz
It is possible for a TCP callout to be removed from the timing wheel,
but have a network interrupt arrive and deactivate the timeout before the callout routine runs. Check for this case in the callout routine; it should only run if the callout is active and not on the wheel.
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r--sys/netinet/tcp_timer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 6429414..980037a 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -169,7 +169,7 @@ tcp_timer_delack(xtp)
int s;
s = splnet();
- if (callout_pending(tp->tt_delack)) {
+ if (callout_pending(tp->tt_delack) || !callout_active(tp->tt_delack)) {
splx(s);
return;
}
@@ -193,7 +193,7 @@ tcp_timer_2msl(xtp)
ostate = tp->t_state;
#endif
s = splnet();
- if (callout_pending(tp->tt_2msl)) {
+ if (callout_pending(tp->tt_2msl) || !callout_active(tp->tt_2msl)) {
splx(s);
return;
}
@@ -231,7 +231,7 @@ tcp_timer_keep(xtp)
ostate = tp->t_state;
#endif
s = splnet();
- if (callout_pending(tp->tt_keep)) {
+ if (callout_pending(tp->tt_keep) || !callout_active(tp->tt_keep)) {
splx(s);
return;
}
@@ -310,7 +310,7 @@ tcp_timer_persist(xtp)
ostate = tp->t_state;
#endif
s = splnet();
- if (callout_pending(tp->tt_persist)) {
+ if (callout_pending(tp->tt_persist) || !callout_active(tp->tt_persist)){
splx(s);
return;
}
@@ -361,7 +361,7 @@ tcp_timer_rexmt(xtp)
ostate = tp->t_state;
#endif
s = splnet();
- if (callout_pending(tp->tt_rexmt)) {
+ if (callout_pending(tp->tt_rexmt) || !callout_active(tp->tt_rexmt)) {
splx(s);
return;
}
OpenPOWER on IntegriCloud