summaryrefslogtreecommitdiff
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-24 15:18:12 (GMT)
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-27 16:33:48 (GMT)
commitcd3decdfd1dbab8a585eafe2e5b9866f193de99e (patch)
tree6683d9e56ca9554aa8c446b311521449c2f4ded5 /net/tipc/node.c
parentc47e9b918844ab7bb139eada7b085c576ddf0afb (diff)
downloadlinux-fsl-qoriq-cd3decdfd1dbab8a585eafe2e5b9866f193de99e.tar.xz
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 27b4bb0..1861ae9 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)
n_ptr->bclink.acked = tipc_bclink_get_last_sent();
if (n_ptr->bclink.supported) {
- tipc_nmap_add(&tipc_bcast_nmap, n_ptr->addr);
+ tipc_bclink_add_node(n_ptr->addr);
if (n_ptr->addr < tipc_own_addr)
tipc_own_tag++;
}
@@ -350,7 +350,7 @@ static void node_lost_contact(struct tipc_node *n_ptr)
n_ptr->bclink.defragm = NULL;
}
- tipc_nmap_remove(&tipc_bcast_nmap, n_ptr->addr);
+ tipc_bclink_remove_node(n_ptr->addr);
tipc_bclink_acknowledge(n_ptr,
mod(n_ptr->bclink.acked + 10000));
if (n_ptr->addr < tipc_own_addr)