tipc: clean up removal of binding table items
authorJon Maloy <jon.maloy@ericsson.com>
Wed, 9 May 2018 00:59:41 +0000 (02:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 May 2018 19:25:45 +0000 (15:25 -0400)
commit5f30721c517a9c8512da3bc8d909ff5e810c2b44
tree407a08b3bbd39d030ddd5830d99adccbdf596cb6
parentf663706a33ce32df69a2b3e85a80cb5a690f2234
tipc: clean up removal of binding table items

In commit be47e41d77fb ("tipc: fix use-after-free in tipc_nametbl_stop")
we fixed a problem caused by premature release of service range items.

That fix is correct, and solved the problem. However, it doesn't address
the root of the problem, which is that we don't lookup the tipc_service
 -> service_range -> publication items in the correct hierarchical
order.

In this commit we try to make this right, and as a side effect obtain
some code simplification.

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