]> 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)
commit3058e01d31bbdbe50e02cafece2b22817a6a0eae
treec97a2482f8307146fdfe06a831094a0212d3d70b
parentb94cbc909f1d80378a1f541968309e5c1178c98b
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: 50a3499ab853 ("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