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>
This commit is contained in:

committed by
Paul Gortmaker

parent
c47e9b9188
commit
cd3decdfd1
@@ -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)
|
||||
|
Reference in New Issue
Block a user