network/stack: Correct deinitialization order.
DeleteChains() needs the chain locks and domains, so those need to be uninitialized after them. This now matches the constructor's deinitialization order. Fixes a panic exposed by the previous commit.
This commit is contained in:
@@ -877,21 +877,22 @@ uninit_stack()
|
||||
TRACE(("Unloading network stack\n"));
|
||||
|
||||
put_module(NET_SOCKET_MODULE_NAME);
|
||||
uninit_timers();
|
||||
uninit_device_interfaces();
|
||||
uninit_interfaces();
|
||||
uninit_domains();
|
||||
uninit_notifications();
|
||||
|
||||
mutex_destroy(&sChainLock);
|
||||
mutex_destroy(&sInitializeChainLock);
|
||||
|
||||
// remove chains and families
|
||||
|
||||
chain::DeleteChains(sProtocolChains);
|
||||
chain::DeleteChains(sDatalinkProtocolChains);
|
||||
chain::DeleteChains(sReceivingProtocolChains);
|
||||
|
||||
mutex_destroy(&sChainLock);
|
||||
mutex_destroy(&sInitializeChainLock);
|
||||
|
||||
uninit_timers();
|
||||
uninit_device_interfaces();
|
||||
uninit_interfaces();
|
||||
uninit_domains();
|
||||
|
||||
struct family* current;
|
||||
current = sFamilies->Clear(true);
|
||||
while (current) {
|
||||
|
||||
Reference in New Issue
Block a user