diff options
Diffstat (limited to 'net/tipc/net.c')
-rw-r--r-- | net/tipc/net.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c index 4fbaa0464405..62199cf5a56c 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
@@ -121,12 +121,15 @@ int tipc_net_init(struct net *net, u8 *node_id, u32 addr) | |||
121 | 121 | ||
122 | void tipc_net_finalize(struct net *net, u32 addr) | 122 | void tipc_net_finalize(struct net *net, u32 addr) |
123 | { | 123 | { |
124 | tipc_set_node_addr(net, addr); | 124 | struct tipc_net *tn = tipc_net(net); |
125 | smp_mb(); | 125 | |
126 | tipc_named_reinit(net); | 126 | if (!cmpxchg(&tn->node_addr, 0, addr)) { |
127 | tipc_sk_reinit(net); | 127 | tipc_set_node_addr(net, addr); |
128 | tipc_nametbl_publish(net, TIPC_CFG_SRV, addr, addr, | 128 | tipc_named_reinit(net); |
129 | TIPC_CLUSTER_SCOPE, 0, addr); | 129 | tipc_sk_reinit(net); |
130 | tipc_nametbl_publish(net, TIPC_CFG_SRV, addr, addr, | ||
131 | TIPC_CLUSTER_SCOPE, 0, addr); | ||
132 | } | ||
130 | } | 133 | } |
131 | 134 | ||
132 | void tipc_net_stop(struct net *net) | 135 | void tipc_net_stop(struct net *net) |