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.
Showing the changes to net/tipc/node.c (1 of 3 files). Show all
Unified · Split
| @@ -307,7 +307,7 @@ static void node_established_contact(struct tipc_node *n_ptr) · 306 unmodified lines | ||
| 307 | 307 | n_ptr->bclink.acked = tipc_bclink_get_last_sent(); |
| 308 | 308 | |
| 309 | 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 | 311 | if (n_ptr->addr < tipc_own_addr) |
| 312 | 312 | tipc_own_tag++; |
| 313 | 313 | } |
| @@ -350,7 +350,7 @@ static void node_lost_contact(struct tipc_node *n_ptr) · 36 unmodified lines | ||
| 350 | 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 | 354 | tipc_bclink_acknowledge(n_ptr, |
| 355 | 355 | mod(n_ptr->bclink.acked + 10000)); |
| 356 | 356 | if (n_ptr->addr < tipc_own_addr) |