On 2/4/24 9:45 PM, David Ahern wrote:
quoted
@@ -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.
quoted
+ lockdep_is_held(&table->tb6_lock)))
+ fib6_add_gc_list(f6i);
+ spin_unlock_bh(&table->tb6_lock);
+ }
fib6_info_release(f6i);
}
}