OSDN Git Service

tipc: make link capability update thread safe
authorJon Maloy <jon.maloy@ericsson.com>
Wed, 18 Jul 2018 17:50:06 +0000 (19:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Jul 2018 19:36:13 +0000 (12:36 -0700)
commit40999f11ce677ce3c5d0e8f5f76c40192a26b479
tree5b5dac9106b60eb5d67e5f204a55ecaeb6db9b43
parentf91a0effcaa6a2eec647cdc53d0d16bff5144c10
tipc: make link capability update thread safe

The commit referred to below introduced an update of the link
capabilities field that is not safe. Given the recently added
feature to remove idle node and link items after 5 minutes, there
is a small risk that the update will happen at the very moment the
targeted link is being removed. To avoid this we have to perform
the update inside the node item's write lock protection.

Fixes: 9012de508956 ("tipc: add sequence number check for link STATE messages")
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/node.c