[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <353fc304-389b-4c16-b78f-20128d688370@kernel.org>
Date: Fri, 8 Dec 2023 15:43:38 -0700
From: David Ahern <dsahern@...nel.org>
To: thinker.li@...il.com, netdev@...r.kernel.org, martin.lau@...ux.dev,
kernel-team@...a.com, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, edumazet@...gle.com
Cc: sinquersw@...il.com, kuifeng@...a.com,
syzbot+c15aa445274af8674f41@...kaller.appspotmail.com
Subject: Re: [PATCH net-next v2 1/2] net/ipv6: insert a f6i to a GC list only
if the f6i is in a fib6_table tree.
On 12/8/23 12:45 PM, thinker.li@...il.com wrote:
> From: Kui-Feng Lee <thinker.li@...il.com>
>
> Check f6i->fib6_node and hlist_unhashed(&f6i->gc_link) before inserting a
> f6i (fib6_info) to tb6_gc_hlist.
>
> The current implementation checks if f6i->fib6_table is not NULL to
> determines if a f6i is on a tree, however it is not enough. When a f6i is
> removed from a fib6_table, f6i->fib6_table is not reset. However, fib6_node
> is always reset when a f6i is removed from a fib6_table and is set when a
> f6i is added to a fib6_table. So, f6i->fib6_node is a reliable way to
> determine if a f6i is on a tree.
Which is an indication that the table is not the right check but neither
is the fib6_node. If expires is set on a route entry, add it to the
gc_list; if expires is reset on a route entry, remove it from the
gc_list. If the value of expires is changed while on the gc_list list,
just update the expires value.
Powered by blists - more mailing lists