]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit42dc0e60aca51f36839fdc45cd77f667cc314ef3
tree5b5dac9106b60eb5d67e5f204a55ecaeb6db9b43
parentb08e604749cd90424d4b5f78128d9bc6556fb08f
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: ce22002206e0 ("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