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
This commit is contained in:
parent
0354c3e056
commit
f8aabcb680
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138622
@ -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 *
|
||||
|
Loading…
Reference in New Issue
Block a user