Skip to content
  • Ying Xue's avatar
    tipc: feed tipc sock pointer to tipc_sk_timeout routine · f2f2a96a
    Ying Xue authored
    
    
    In order to make tipc socket table aware of namespace, a networking
    namespace instance must be passed to tipc_sk_lookup(), allowing it
    to look up tipc socket instance with a given port ID from a concrete
    socket table. However, as now tipc_sk_timeout() only has one port ID
    parameter and is not namespace aware, it's unable to obtain a correct
    socket instance through tipc_sk_lookup() just with a port ID,
    especially after namespace is completely supported.
    
    If port ID is replaced with socket instance as tipc_sk_timeout()'s
    parameter, it's unnecessary to look up socket table. But as the timer
    handler - tipc_sk_timeout() is run asynchronously, socket reference
    must be held before its timer is launched, and must be carefully
    checked to identify whether the socket reference needs to be put or
    not when its timer is terminated.
    
    Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
    Tested-by: default avatarTero Aho <Tero.Aho@coriant.com>
    Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f2f2a96a