• Xin Long's avatar
    tipc: use rcu dereference functions properly · 30a4616c
    Xin Long authored
    For these places are protected by rcu_read_lock, we change from
    rcu_dereference_rtnl to rcu_dereference, as there is no need to
    check if rtnl lock is held.
    
    For these places are protected by rtnl_lock, we change from
    rcu_dereference_rtnl to rtnl_dereference/rcu_dereference_protected,
    as no extra memory barriers are needed under rtnl_lock() which also
    protects tn->bearer_list[] and dev->tipc_ptr/b->media_ptr updating.
    
    rcu_dereference_rtnl will be only used in the places where it could
    be under rcu_read_lock or rtnl_lock.
    Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    30a4616c
udp_media.c 20.8 KB