]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: make node link identity publish thread safe
authorHoang Le <hoang.h.le@dektech.com.au>
Mon, 10 May 2021 02:57:38 +0000 (09:57 +0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 May 2021 21:41:30 +0000 (14:41 -0700)
commit1ad52ce61b1caeea0de891f68a84bb64df4285ff
treec97a2482f8307146fdfe06a831094a0212d3d70b
parent3bbe8c7c8dc9acce05178711cb33f53eaa77e990
tipc: make node link identity publish thread safe

The using of the node address and node link identity are not thread safe,
meaning that two publications may be published the same values, as result
one of them will get failure because of already existing in the name table.
To avoid this we have to use the node address and node link identity values
from inside the node item's write lock protection.

Fixes: adb39cb3344e ("tipc: simplify signature of tipc_namtbl_publish()")
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/node.c