]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Jul 2018 10:49:02 +0000 (19:49 +0900)
commit25e293c4b6c58be2daae54168606f586a457e472
tree7d2f742a0a79418fa0b8388e0b4d19847d58298a
parent747d82b3806e2b030748eb22d89fdb8b727df063
tipc: make function tipc_net_finalize() thread safe

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: b8bd0db28fc0 ("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>
net/tipc/net.c