diff options
author | Herbert Xu <[email protected]> | 2017-04-28 14:10:48 +0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2017-04-28 10:14:09 -0400 |
commit | 2d2ab658d2debcb4c0e29c9e6f18e5683f3077bf (patch) | |
tree | 163eada4e9bf806b7057e5b5843820be1b6d0ff5 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |
parent | e221c1f0fe2590042b4f8c3a8ccccd8e7bed2c31 (diff) |
rhashtable: Do not lower max_elems when max_size is zero
The commit 6d684e54690c ("rhashtable: Cap total number of entries
to 2^31") breaks rhashtable users that do not set max_size. This
is because when max_size is zero max_elems is also incorrectly set
to zero instead of 2^31.
This patch fixes it by only lowering max_elems when max_size is not
zero.
Fixes: 6d684e54690c ("rhashtable: Cap total number of entries to 2^31")
Reported-by: Florian Fainelli <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions