[<prev] [next>] [day] [month] [year] [list]
Message-ID: <fc1bde05-8f7b-9d1f-a55f-8c77cfd55ee3@gmail.com>
Date: Wed, 13 Oct 2021 20:51:59 -0600
From: David Ahern <dsahern@...il.com>
To: 张凯 <zhangkaiheb@....com>
Cc: davem@...emloft.net, yoshfuji@...ux-ipv6.org, dsahern@...nel.org,
kuba@...nel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipv4: only allow increasing fib_info_hash_size
On 10/13/21 2:05 AM, 张凯 wrote:
> Should we let the function still work when the below check is true, not goto failure?
>
> if (new_size < fib_info_hash_size)
> goto failure;
>
>
no, it can not.
if (fib_info_cnt >= fib_info_hash_size) {
means the hash table is full. It is going down this path to expand. If
expansion can not happen then you can not add more entries.
This is all theory hence the request for a simpler change; in reality
there should never be so many unique fib_info entries across namespaces
to hit an overflow.
Powered by blists - more mailing lists