• Nikolay Aleksandrov's avatar
    net: ipv6: add fib6_nh_release_dsts stub · 8837cbbf
    Nikolay Aleksandrov authored
    We need a way to release a fib6_nh's per-cpu dsts when replacing
    nexthops otherwise we can end up with stale per-cpu dsts which hold net
    device references, so add a new IPv6 stub called fib6_nh_release_dsts.
    It must be used after an RCU grace period, so no new dsts can be created
    through a group's nexthop entry.
    Similar to fib6_nh_release it shouldn't be used if fib6_nh_init has failed
    so it doesn't need a dummy stub when IPv6 is not enabled.
    
    Fixes: 7bf4796d ("nexthops: add support for replace")
    Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8837cbbf
ipv6_stubs.h 3.23 KB