From 79a9e59c8923afa27a284c0c87495af1addee711 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sun, 5 Dec 2004 22:47:29 +0000 Subject: [PATCH] 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 --- sys/netinet/tcp_timer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 8fb49ebbc3bc..9daf4379ae6a 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;