• David Ahern's avatar
    net/ipv6: Make from in rt6_info rcu protected · a68886a6
    David Ahern authored
    When a dst entry is created from a fib entry, the 'from' in rt6_info
    is set to the fib entry. The 'from' reference is used most notably for
    cookie checking - making sure stale dst entries are updated if the
    fib entry is changed.
    
    When a fib entry is deleted, the pcpu routes on it are walked releasing
    the fib6_info reference. This is needed for the fib6_info cleanup to
    happen and to make sure all device references are released in a timely
    manner.
    
    There is a race window when a FIB entry is deleted and the 'from' on the
    pcpu route is dropped and the pcpu route hits a cookie check. Handle
    this race using rcu on from.
    Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a68886a6
ip6_fib.h 11.3 KB