summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timer.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-12-05 22:47:29 +0000
committerrwatson <rwatson@FreeBSD.org>2004-12-05 22:47:29 +0000
commit47b5ad626d6c5c470e3ff0580a67751805f5dfca (patch)
treef834cbbe794ed137d1b7ade83597ce13a6139bba /sys/netinet/tcp_timer.c
parent1286f9fc648a385aec034116f013524c25748536 (diff)
downloadFreeBSD-src-47b5ad626d6c5c470e3ff0580a67751805f5dfca.zip
FreeBSD-src-47b5ad626d6c5c470e3ff0580a67751805f5dfca.tar.gz
Assert the tcptw inpcb lock in tcp_timer_2msl_reset(), as fields in
the tcptw undergo non-atomic read-modify-writes. MFC after: 2 weeks
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r--sys/netinet/tcp_timer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 8fb49eb..9daf437 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -280,6 +280,7 @@ tcp_timer_2msl_reset(struct tcptw *tw, int timeo)
struct tcptw *tw_tail;
INP_INFO_WLOCK_ASSERT(&tcbinfo);
+ INP_LOCK_ASSERT(tw->tw_inpcb);
if (tw->tw_time != 0)
LIST_REMOVE(tw, tw_2msl);
tw->tw_time = timeo + ticks;
OpenPOWER on IntegriCloud