aboutsummaryrefslogtreecommitdiff
path: root/net/tipc/core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-12-11 17:47:55 +0000
committerMark Brown <broonie@kernel.org>2020-12-11 17:47:55 +0000
commit031616c434db05ce766f76c62865f55698e0924f (patch)
tree7f29aa1ff3e7b51a8058cd570fb785c6e769b245 /net/tipc/core.c
parent064841ccfc49b2315dc0b797239862d3a343aa07 (diff)
parent85a7555575a0e48f9b73db310d0d762a08a46d63 (diff)
Merge remote-tracking branch 'asoc/for-5.10' into asoc-linus
Diffstat (limited to 'net/tipc/core.c')
-rw-r--r--net/tipc/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c
index 4f6dc74adf45..c2ff42900b53 100644
--- a/net/tipc/core.c
+++ b/net/tipc/core.c
@@ -60,6 +60,7 @@ static int __net_init tipc_init_net(struct net *net)
tn->trial_addr = 0;
tn->addr_trial_end = 0;
tn->capabilities = TIPC_NODE_CAPABILITIES;
+ INIT_WORK(&tn->final_work.work, tipc_net_finalize_work);
memset(tn->node_id, 0, sizeof(tn->node_id));
memset(tn->node_id_string, 0, sizeof(tn->node_id_string));
tn->mon_threshold = TIPC_DEF_MON_THRESHOLD;
@@ -107,8 +108,13 @@ out_crypto:
static void __net_exit tipc_exit_net(struct net *net)
{
+ struct tipc_net *tn = tipc_net(net);
+
tipc_detach_loopback(net);
+ /* Make sure the tipc_net_finalize_work() finished */
+ cancel_work_sync(&tn->final_work.work);
tipc_net_stop(net);
+
tipc_bcast_stop(net);
tipc_nametbl_stop(net);
tipc_sk_rht_destroy(net);