aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-24 11:18:12 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-27 11:33:48 -0500
commitcd3decdfd1dbab8a585eafe2e5b9866f193de99e (patch)
tree6683d9e56ca9554aa8c446b311521449c2f4ded5 /net/tipc/node.c
parentc47e9b918844ab7bb139eada7b085c576ddf0afb (diff)
tipc: Ensure broadcast link spinlock is held when updating node map
Fixes oversight that allowed broadcast link node map to be updated without first taking the broadcast link spinlock that protects the map. As part of this fix the node map has been incorporated into the broadcast link structure to make the need for such protection more evident. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 27b4bb0cca6c..1861ae915f17 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -307,7 +307,7 @@ static void node_established_contact(struct tipc_node *n_ptr)
307 n_ptr->bclink.acked = tipc_bclink_get_last_sent(); 307 n_ptr->bclink.acked = tipc_bclink_get_last_sent();
308 308
309 if (n_ptr->bclink.supported) { 309 if (n_ptr->bclink.supported) {
310 tipc_nmap_add(&tipc_bcast_nmap, n_ptr->addr); 310 tipc_bclink_add_node(n_ptr->addr);
311 if (n_ptr->addr < tipc_own_addr) 311 if (n_ptr->addr < tipc_own_addr)
312 tipc_own_tag++; 312 tipc_own_tag++;
313 } 313 }
@@ -350,7 +350,7 @@ static void node_lost_contact(struct tipc_node *n_ptr)
350 n_ptr->bclink.defragm = NULL; 350 n_ptr->bclink.defragm = NULL;
351 } 351 }
352 352
353 tipc_nmap_remove(&tipc_bcast_nmap, n_ptr->addr); 353 tipc_bclink_remove_node(n_ptr->addr);
354 tipc_bclink_acknowledge(n_ptr, 354 tipc_bclink_acknowledge(n_ptr,
355 mod(n_ptr->bclink.acked + 10000)); 355 mod(n_ptr->bclink.acked + 10000));
356 if (n_ptr->addr < tipc_own_addr) 356 if (n_ptr->addr < tipc_own_addr)