diff options
author | Nikolay Aleksandrov <nikolay@nvidia.com> | 2021-11-22 16:15:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-22 16:44:49 +0100 |
commit | 8837cbbf854246f5f4d565f21e6baa945d37aded (patch) | |
tree | 23c2e14d568ef38ace50fa87f761599df6601068 /net/ipv6/af_inet6.c | |
parent | net, neigh: Fix crash in v6 module initialization error path (diff) | |
download | linux-8837cbbf854246f5f4d565f21e6baa945d37aded.tar.xz linux-8837cbbf854246f5f4d565f21e6baa945d37aded.zip |
net: ipv6: add fib6_nh_release_dsts stub
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: 7bf4796dd099 ("nexthops: add support for replace")
Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 0c4da163535a..dab4a047590b 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -1026,6 +1026,7 @@ static const struct ipv6_stub ipv6_stub_impl = { .ip6_mtu_from_fib6 = ip6_mtu_from_fib6, .fib6_nh_init = fib6_nh_init, .fib6_nh_release = fib6_nh_release, + .fib6_nh_release_dsts = fib6_nh_release_dsts, .fib6_update_sernum = fib6_update_sernum_stub, .fib6_rt_update = fib6_rt_update, .ip6_del_rt = ip6_del_rt, |