diff options
Diffstat (limited to 'sys/kern/uipc_domain.c')
-rw-r--r-- | sys/kern/uipc_domain.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index 33a21c5..b94c114 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -134,8 +134,13 @@ domaininit(void *dummy) if (max_linkhdr < 16) /* XXX */ max_linkhdr = 16; - callout_init(&pffast_callout, 0); - callout_init(&pfslow_callout, 0); + if (debug_mpsafenet) { + callout_init(&pffast_callout, CALLOUT_MPSAFE); + callout_init(&pfslow_callout, CALLOUT_MPSAFE); + } else { + callout_init(&pffast_callout, 0); + callout_init(&pfslow_callout, 0); + } callout_reset(&pffast_callout, 1, pffasttimo, NULL); callout_reset(&pfslow_callout, 1, pfslowtimo, NULL); @@ -236,6 +241,8 @@ pfslowtimo(arg) register struct domain *dp; register struct protosw *pr; + NET_ASSERT_GIANT(); + for (dp = domains; dp; dp = dp->dom_next) for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) if (pr->pr_slowtimo) @@ -250,6 +257,8 @@ pffasttimo(arg) register struct domain *dp; register struct protosw *pr; + NET_ASSERT_GIANT(); + for (dp = domains; dp; dp = dp->dom_next) for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) if (pr->pr_fasttimo) |