[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6e659e99-97dd-474d-9706-76ae44dd921a@kernel.org>
Date: Mon, 5 Feb 2024 08:24:31 -0700
From: David Ahern <dsahern@...nel.org>
To: thinker.li@...il.com, netdev@...r.kernel.org, ast@...nel.org,
martin.lau@...ux.dev, kernel-team@...a.com, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, liuhangbin@...il.com
Cc: sinquersw@...il.com, kuifeng@...a.com
Subject: Re: [PATCH net-next v3 3/5] net/ipv6: Remove expired routes with a
separated list of routes.
On 2/4/24 9:45 PM, David Ahern wrote:
>> @@ -1264,8 +1265,18 @@ cleanup_prefix_route(struct inet6_ifaddr *ifp, unsigned long expires,
>> if (del_rt)
>> ip6_del_rt(dev_net(ifp->idev->dev), f6i, false);
>> else {
>> - if (!(f6i->fib6_flags & RTF_EXPIRES))
>> + if (!(f6i->fib6_flags & RTF_EXPIRES)) {
>> + table = f6i->fib6_table;
>> + spin_lock_bh(&table->tb6_lock);
>> fib6_set_expires(f6i, expires);
>> + /* If fib6_node is null, the f6i is just
>> + * removed from the table.
>> + */
>> + if (rcu_dereference_protected(f6i->fib6_node,
>
> ... meaning this check should not be needed
reviewing this patch again this morning, and yes, I believe this check
is needed here and other places. Given that all of the instances check
if the route entry is still in the table, it should be consolidated into
fb6_add_gc_list.
>
>> + lockdep_is_held(&table->tb6_lock)))
>> + fib6_add_gc_list(f6i);
>> + spin_unlock_bh(&table->tb6_lock);
>> + }
>> fib6_info_release(f6i);
>> }
>> }
Powered by blists - more mailing lists