]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix memory leak during module removal
authorErik Hugne <erik.hugne@ericsson.com>
Thu, 6 Mar 2014 13:40:20 +0000 (14:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Mar 2014 19:46:24 +0000 (14:46 -0500)
commit7461c4499070b53707e7fde9ba5aa84a4bda8e24
tree1ce55ec1541b24d7f6db65897067c7b7f637bcb2
parent53aa3625f6145433f28d8c0aa3076f7a8db06d32
tipc: fix memory leak during module removal

When the TIPC module is removed, the tasklet handler is disabled
before all other subsystems. This will cause lingering publications
in the name table because the node_down tasklets responsible to
clean up publications from an unreachable node will never run.
When the name table is shut down, these publications are detected
and an error message is logged:
tipc: nametbl_stop(): orphaned hash chain detected
This is actually a memory leak, introduced with commit
51221cc95aa070b607fb3db580aa27abf6105f17 ("tipc: correct the order
of stopping services at rmmod")

Instead of just logging an error and leaking memory, we free
the orphaned entries during nametable shutdown.

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