• Eric Dumazet's avatar
    rtnetlink: change nlk->cb_mutex role · e39951d9
    Eric Dumazet authored
    In commit af65bdfc ("[NETLINK]: Switch cb_lock spinlock
    to mutex and allow to override it"), Patrick McHardy used
    a common mutex to protect both nlk->cb and the dump() operations.
    
    The override is used for rtnl dumps, registered with
    rntl_register() and rntl_register_module().
    
    We want to be able to opt-out some dump() operations
    to not acquire RTNL, so we need to protect nlk->cb
    with a per socket mutex.
    
    This patch renames nlk->cb_def_mutex to nlk->nl_cb_mutex
    
    The optional pointer to the mutex used to protect dump()
    call is stored in nlk->dump_cb_mutex
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e39951d9
af_netlink.h 1.96 KB