diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2016-02-11 00:14:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-16 23:57:11 +0300 |
commit | d5c91fb72f1652ea3026925240a0998a42ddb16b (patch) | |
tree | 8e731cefe0bc105ddede8e43ff947fe9903a8ee3 /net/dsa/slave.c | |
parent | 7facc5fbde878b2441962748823966bf2ec1d446 (diff) | |
download | linux-d5c91fb72f1652ea3026925240a0998a42ddb16b.tar.xz |
tipc: fix premature addition of node to lookup table
In commit 5266698661401a ("tipc: let broadcast packet reception
use new link receive function") we introduced a new per-node
broadcast reception link instance. This link is created at the
moment the node itself is created. Unfortunately, the allocation
is done after the node instance has already been added to the node
lookup hash table. This creates a potential race condition, where
arriving broadcast packets are able to find and access the node
before it has been fully initialized, and before the above mentioned
link has been created. The result is occasional crashes in the function
tipc_bcast_rcv(), which is trying to access the not-yet existing link.
We fix this by deferring the addition of the node instance until after
it has been fully initialized in the function tipc_node_create().
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
0 files changed, 0 insertions, 0 deletions