]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: simplify relationship between name table lock and node lock
authorYing Xue <ying.xue@windriver.com>
Tue, 2 Dec 2014 07:00:28 +0000 (15:00 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Dec 2014 01:39:57 +0000 (20:39 -0500)
commitbc1cb425f46d1cc5fa242c1d76ad37977a8dd553
tree8e3ea19de6d1ca5cab811922c60250e5be64bd33
parentf6814f3b8d5c623b85384e29984d08d16fcba555
tipc: simplify relationship between name table lock and node lock

When tipc name sequence is published, name table lock is released
before name sequence buffer is delivered to remote nodes through its
underlying unicast links. However, when name sequence is withdrawn,
the name table lock is held until the transmission of the removal
message of name sequence is finished. During the process, node lock
is nested in name table lock. To prevent node lock from being nested
in name table lock, while withdrawing name, we should adopt the same
locking policy of publishing name sequence: name table lock should
be released before message is sent.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Tested-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/name_table.c