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:
Robert Watson 2004-12-05 22:47:29 +00:00
parent f4deb15f08
commit 79a9e59c89

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;