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
This commit is contained in:
rwatson 2004-12-05 22:47:29 +00:00
parent 1286f9fc64
commit 47b5ad626d

View File

@ -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;