summaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.h
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-04-21 10:55:51 +0800
committerDavid S. Miller <davem@davemloft.net>2014-04-22 21:17:53 -0400
commit28dd94187afd660a350d01d6bad4a915a6d570b8 (patch)
treec53e49a95c682a5d656fa7e95d847a8ae10aeb50 /net/tipc/bcast.h
parent4ae88c94d3b52dc47c6ad9352991219862f703f9 (diff)
downloadop-kernel-dev-28dd94187afd660a350d01d6bad4a915a6d570b8.zip
op-kernel-dev-28dd94187afd660a350d01d6bad4a915a6d570b8.tar.gz
tipc: use bc_lock to protect node map in bearer structure
The node map variable - 'nodes' in bearer structure is only used by bclink. When bclink accesses it, bc_lock is held. But when change it, for instance, in tipc_bearer_add_dest() or tipc_bearer_remove_dest() the bc_lock is not taken at all. To avoid any inconsistent data, we should always grab bc_lock while accessing node map variable. Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Tested-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bcast.h')
-rw-r--r--net/tipc/bcast.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/tipc/bcast.h b/net/tipc/bcast.h
index a80ef54..7c1ef1b 100644
--- a/net/tipc/bcast.h
+++ b/net/tipc/bcast.h
@@ -69,9 +69,6 @@ struct tipc_node;
extern const char tipc_bclink_name[];
-void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node);
-void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node);
-
/**
* tipc_nmap_equal - test for equality of node maps
*/
@@ -98,6 +95,6 @@ void tipc_bclink_update_link_state(struct tipc_node *n_ptr, u32 last_sent);
int tipc_bclink_stats(char *stats_buf, const u32 buf_size);
int tipc_bclink_reset_stats(void);
int tipc_bclink_set_queue_limits(u32 limit);
-void tipc_bcbearer_sort(void);
+void tipc_bcbearer_sort(struct tipc_node_map *nm_ptr, u32 node, bool action);
#endif
OpenPOWER on IntegriCloud