Messages in this thread | | | Subject | Re: [PATCH] ipv4: only allow increasing fib_info_hash_size | From | David Ahern <> | Date | Wed, 13 Oct 2021 20:51:59 -0600 |
| |
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.
| |