• Ying Xue's avatar
    tipc: avoid packets leaking on socket receive queue · f4195d1e
    Ying Xue authored
    Even if we drain receive queue thoroughly in tipc_release() after tipc
    socket is removed from rhashtable, it is possible that some packets
    are in flight because some CPU runs receiver and did rhashtable lookup
    before we removed socket. They will achieve receive queue, but nobody
    delete them at all. To avoid this leak, we register a private socket
    destructor to purge receive queue, meaning releasing packets pending
    on receive queue will be delayed until the last reference of tipc
    socket will be released.
    Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f4195d1e
socket.c 72.1 KB