summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-04-29 20:36:43 +0200
committerDavid S. Miller <davem@davemloft.net>2024-05-01 12:46:21 +0200
commitfff6e6accdb71e5dd36e50478bd82d5409ac32d2 (patch)
tree79f8f803359453261092669cf98dcbd45f8c062d
parentnetpoll: Fix race condition in netpoll_owner_active (diff)
downloadlinux-fff6e6accdb71e5dd36e50478bd82d5409ac32d2.tar.xz
linux-fff6e6accdb71e5dd36e50478bd82d5409ac32d2.zip
ipv6: anycast: use call_rcu_hurry() in aca_put()
This is a followup of commit b5327b9a300e ("ipv6: use call_rcu_hurry() in fib6_info_release()"). I had another pmtu.sh failure, and found another lazy call_rcu() causing this failure. aca_free_rcu() calls fib6_info_release() which releases devices references. We must not delay it too much or risk unregister_netdevice/ref_tracker traces because references to netdev are not released in time. This should speedup device/netns dismantles when CONFIG_RCU_LAZY=y Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/anycast.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 0f2506e35359..0627c4c18d1a 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -252,9 +252,8 @@ static void aca_free_rcu(struct rcu_head *h)
static void aca_put(struct ifacaddr6 *ac)
{
- if (refcount_dec_and_test(&ac->aca_refcnt)) {
- call_rcu(&ac->rcu, aca_free_rcu);
- }
+ if (refcount_dec_and_test(&ac->aca_refcnt))
+ call_rcu_hurry(&ac->rcu, aca_free_rcu);
}
static struct ifacaddr6 *aca_alloc(struct fib6_info *f6i,