]> 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)
commitd596a8327ae4ea55b4669acb8133c798922048e1
tree1ce55ec1541b24d7f6db65897067c7b7f637bcb2
parent12e219ee4d88524e698da0caf0282c16f2cfad92
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
a5537e6f80ce0040ee320d5e684e73244d901147 ("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