• Erik Hugne's avatar
    tipc: fix memory leak during module removal · 1bb8dce5
    Erik Hugne authored
    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
    993b858e ("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: default avatarErik Hugne <erik.hugne@ericsson.com>
    Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1bb8dce5
name_table.c 26.1 KB