]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tipc: make function tipc_net_finalize() thread safe
authorJon Maloy <jon.maloy@ericsson.com>
Fri, 6 Jul 2018 18:10:06 +0000 (20:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:07:01 +0000 (13:07 +0200)
commit91df8f524275477b0212f6ea539cd2aba9695f31
tree599a7113bacc5fac428d47575563c2e9fd96c651
parenta4100054e307ad6aae0ed4c46262d059a7239e4a
tipc: make function tipc_net_finalize() thread safe

[ Upstream commit 9faa89d4ed9d7d326f4763d262842270450f9b1f ]

The setting of the node address is not thread safe, meaning that
two discoverers may decide to set it simultanously, with a duplicate
entry in the name table as result. We fix that with this commit.

Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values")
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/tipc/net.c