diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-12-16 18:13:14 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-22 20:54:16 -0800 |
commit | 78e1970233fd270349834bb8b7ca84c58c7c974c (patch) | |
tree | f2b014af5bde3352552c38c9a253859d38f98a3d /fs/ntfs | |
parent | abf79193eb35f1786a3e22fda24cb6cd32b0083b (diff) |
rhashtable: Enforce minimum size on initial hash table
[ Upstream commit 3a324606bbabfc30084ce9d08169910773ba9a92 ]
William Hua <william.hua@canonical.com> wrote:
>
> I wasn't aware there was an enforced minimum size. I simply set the
> nelem_hint in the rhastable_params struct to 1, expecting it to grow as
> needed. This caused a segfault afterwards when trying to insert an
> element.
OK we're doing the size computation before we enforce the limit
on min_size.
---8<---
We need to do the initial hash table size computation after we
have obtained the correct min_size/max_size parameters. Otherwise
we may end up with a hash table whose size is outside the allowed
envelope.
Fixes: a998f712f77e ("rhashtable: Round up/down min/max_size to...")
Reported-by: William Hua <william.hua@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ntfs')
0 files changed, 0 insertions, 0 deletions