]> 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)
commit68087eb26ca86e0e40e59f1ccc03ca95f3f5dbdd
treec97a2482f8307146fdfe06a831094a0212d3d70b
parent5a5a201b55efa5434579cb7d37350723c0844f94
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: c07fd5f847a5 ("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