diff options
author | Ying Xue <ying.xue@windriver.com> | 2014-03-27 12:54:32 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-27 13:08:36 -0400 |
commit | 78dfb789b69f161703ef322a0c2e3e61c7f7573a (patch) | |
tree | 56d0b040948715a0e941a6a6c0b2440d14d731ed /net/tipc/port.c | |
parent | 5902385a2440a55f005b266c93e0bb9398e5a62b (diff) | |
download | linux-78dfb789b69f161703ef322a0c2e3e61c7f7573a.tar.bz2 |
tipc: acquire necessary locks in named_cluster_distribute routine
The 'tipc_node_list' is guarded by tipc_net_lock and 'links' array
defined in 'tipc_node' structure is protected by node lock as well.
Without acquiring the two locks in named_cluster_distribute() a fatal
oops may happen in case that a destroyed link might be got and then
accessed. Therefore, above mentioned two locks must be held in
named_cluster_distribute() to prevent the issue from happening
accidentally.
As 'links' array in node struct must be protected by node lock,
we have to move the code of selecting an active link from
tipc_link_xmit() to named_cluster_distribute() and then call
__tipc_link_xmit() with the selected link to deliver name messages.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/port.c')
0 files changed, 0 insertions, 0 deletions