• Eric Dumazet's avatar
    [FIB]: Fix rcu_dereference() abuses in fib_trie.c · b59cfbf7
    Eric Dumazet authored
    node_parent() and tnode_get_child() currently use rcu_dereference().
    
    These functions are called from both
    - readers only paths (where rcu_dereference() is needed), and
    - writer path (where rcu_dereference() is not needed)
    
    To make explicit where rcu_dereference() is really needed, I
    introduced new node_parent_rcu() and tnode_get_child_rcu() functions
    which use rcu_dereference(), while node_parent() and tnode_get_child()
    dont use it.
    
    Then I changed calling sites where rcu_dereference() was really needed
    to call the _rcu() variants.
    
    This should have no impact but for alpha architecture, and may help
    future sparse checks.
    Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b59cfbf7
fib_trie.c 59.2 KB