aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/net.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2012-04-18 09:12:09 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-04-19 15:46:46 -0400
commit974a5a864bf959b7f3412a31ee8ce001c6628451 (patch)
tree5f5c99f05f5dda3b6d4c384c1420700ab7d580ff /net/tipc/net.c
parentf0712e86b75f4839773abbc01d5baa7e36e378c2 (diff)
tipc: take lock while updating node network address
The routine that changes the node's network address now takes TIPC's network lock in write mode while the main address variable and associated data structures are being changed; this is needed to ensure that the link subsystem won't attempt to send a message off-node until the sending port's message header template has been updated with the node's new network address. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/net.c')
-rw-r--r--net/tipc/net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c
index d4531b07076c..5fab4ff24a94 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -178,11 +178,12 @@ int tipc_net_start(u32 addr)
178 tipc_subscr_stop(); 178 tipc_subscr_stop();
179 tipc_cfg_stop(); 179 tipc_cfg_stop();
180 180
181 write_lock_bh(&tipc_net_lock);
181 tipc_own_addr = addr; 182 tipc_own_addr = addr;
182 tipc_named_reinit(); 183 tipc_named_reinit();
183 tipc_port_reinit(); 184 tipc_port_reinit();
184
185 tipc_bclink_init(); 185 tipc_bclink_init();
186 write_unlock_bh(&tipc_net_lock);
186 187
187 tipc_k_signal((Handler)tipc_subscr_start, 0); 188 tipc_k_signal((Handler)tipc_subscr_start, 0);
188 tipc_k_signal((Handler)tipc_cfg_init, 0); 189 tipc_k_signal((Handler)tipc_cfg_init, 0);