diff options
author | mlaier <mlaier@FreeBSD.org> | 2004-12-09 11:47:30 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2004-12-09 11:47:30 +0000 |
commit | 488882b3e93b211a6c11807cae679fe0ba14ca7c (patch) | |
tree | 5fe1083655106ab326e341da4fb5806e7cf21eb0 | |
parent | ba2adca5db153702b4f8809e88175444e1d92fa1 (diff) | |
download | FreeBSD-src-488882b3e93b211a6c11807cae679fe0ba14ca7c.zip FreeBSD-src-488882b3e93b211a6c11807cae679fe0ba14ca7c.tar.gz |
Start the protocol timeouts only after all domains have been initialized
completely. For some reason (that I am still curious about) we started to no
longer manage to finish the initialization before the timeouts run the first
time leading to panics when using uninitialized mutex etc.
The root of this problem is that we currently first link a domain to the
domains list and only later initialize the domain's protocols. This should
be reworked in the future, but with the current API it is not possible in
all situations. We settle with this lazy fix for now.
Tested by: gnn, ru, myself
-rw-r--r-- | sys/kern/uipc_domain.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index 91f5c9f..5335132 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -215,9 +215,6 @@ domaininit(void *dummy) KASSERT(domain_init_status == 0, ("domaininit called too late!")); domain_init_status = 1; mtx_unlock(&dom_mtx); - - callout_reset(&pffast_callout, 1, pffasttimo, NULL); - callout_reset(&pfslow_callout, 1, pfslowtimo, NULL); } /* ARGSUSED*/ @@ -228,6 +225,9 @@ domainfinalize(void *dummy) KASSERT(domain_init_status == 1, ("domainfinalize called too late!")); domain_init_status = 2; mtx_unlock(&dom_mtx); + + callout_reset(&pffast_callout, 1, pffasttimo, NULL); + callout_reset(&pfslow_callout, 1, pfslowtimo, NULL); } struct protosw * |