summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2007-05-11 20:52:47 +0000
committerandre <andre@FreeBSD.org>2007-05-11 20:52:47 +0000
commit14d6d7db44ab4d0393510d32ce6e0df269dd27e6 (patch)
tree503b36d9340c08dafb82fe89daaf7d1e4cc1fa5f /sys/netinet
parenta968d55db329f3cf22701c6c0cebc11db78c7e96 (diff)
downloadFreeBSD-src-14d6d7db44ab4d0393510d32ce6e0df269dd27e6.zip
FreeBSD-src-14d6d7db44ab4d0393510d32ce6e0df269dd27e6.tar.gz
Make the TCP timer callout obtain Giant if the network stack is marked
as non-mpsafe. This change is to be removed when all protocols are mp-safe.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_subr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index aa2b86d..90c2aba 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -653,8 +653,12 @@ tcp_newtcpcb(struct inpcb *inp)
tcp_mssdflt;
/* Set up our timeouts. */
- callout_init_mtx(&tp->t_timers->tt_timer, &inp->inp_mtx,
- CALLOUT_RETURNUNLOCKED);
+ if (NET_CALLOUT_MPSAFE)
+ callout_init_mtx(&tp->t_timers->tt_timer, &inp->inp_mtx,
+ CALLOUT_RETURNUNLOCKED);
+ else
+ callout_init_mtx(&tp->t_timers->tt_timer, &inp->inp_mtx,
+ (CALLOUT_RETURNUNLOCKED|CALLOUT_NETGIANT));
if (tcp_do_rfc1323)
tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);
OpenPOWER on IntegriCloud