Re: [PATCH resend -next] lib/rhashtable: consider param->min_size when setting initial table size

From: David Miller
Date: Wed Jul 18 2018 - 16:28:16 EST


From: Davidlohr Bueso <dave@xxxxxxxxxxxx>
Date: Mon, 16 Jul 2018 13:26:13 -0700

> rhashtable_init() currently does not take into account the user-passed
> min_size parameter unless param->nelem_hint is set as well. As such,
> the default size (number of buckets) will always be HASH_DEFAULT_SIZE
> even if the smallest allowed size is larger than that. Remediate this
> by unconditionally calling into rounded_hashtable_size() and handling
> things accordingly.
>
> Signed-off-by: Davidlohr Bueso <dbueso@xxxxxxx>
> Acked-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> ---
> Resending per Herbert's request with Cc to netdev.

Applied and queued up for -stable, thanks.