diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2004-06-20 21:44:50 +0000 | 
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2004-06-20 21:44:50 +0000 | 
| commit | d330008e3b40d56ef4982240349ed339afab70cb (patch) | |
| tree | 09e8321c815240cc804b18aa41751aa67927a260 /sys/netinet/tcp_timewait.c | |
| parent | c9f69064af9f28bfc4e8b0351d1063de6911f421 (diff) | |
Notes
Diffstat (limited to 'sys/netinet/tcp_timewait.c')
| -rw-r--r-- | sys/netinet/tcp_timewait.c | 17 | 
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 3b478d61ae9d..b5cfd43b5193 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -576,6 +576,7 @@ tcp_newtcpcb(inp)  #ifdef INET6  	int isipv6 = (inp->inp_vflag & INP_IPV6) != 0;  #endif /* INET6 */ +	int callout_flag;  	tm = uma_zalloc(tcpcb_zone, M_NOWAIT | M_ZERO);  	if (tm == NULL) @@ -589,11 +590,17 @@ tcp_newtcpcb(inp)  		tcp_mssdflt;  	/* Set up our timeouts. */ -	callout_init(tp->tt_rexmt = &tm->tcpcb_mem_rexmt, 0); -	callout_init(tp->tt_persist = &tm->tcpcb_mem_persist, 0); -	callout_init(tp->tt_keep = &tm->tcpcb_mem_keep, 0); -	callout_init(tp->tt_2msl = &tm->tcpcb_mem_2msl, 0); -	callout_init(tp->tt_delack = &tm->tcpcb_mem_delack, 0); +	/* +	 * XXXRW: Are these actually MPSAFE?  I think so, but need to +	 * review the timed wait code, as it has some list variables, +	 * etc, that are global. +	 */ +	callout_flag = debug_mpsafenet ? CALLOUT_MPSAFE : 0; +	callout_init(tp->tt_rexmt = &tm->tcpcb_mem_rexmt, callout_flag); +	callout_init(tp->tt_persist = &tm->tcpcb_mem_persist, callout_flag); +	callout_init(tp->tt_keep = &tm->tcpcb_mem_keep, callout_flag); +	callout_init(tp->tt_2msl = &tm->tcpcb_mem_2msl, callout_flag); +	callout_init(tp->tt_delack = &tm->tcpcb_mem_delack, callout_flag);  	if (tcp_do_rfc1323)  		tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);  | 
