diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2011-10-24 11:18:12 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-12-27 11:33:48 -0500 |
commit | cd3decdfd1dbab8a585eafe2e5b9866f193de99e (patch) | |
tree | 6683d9e56ca9554aa8c446b311521449c2f4ded5 /net/tipc/node.c | |
parent | c47e9b918844ab7bb139eada7b085c576ddf0afb (diff) | |
download | linux-cd3decdfd1dbab8a585eafe2e5b9866f193de99e.tar.bz2 |
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.c | 4 |
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) 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) |