]> git.baikalelectronics.ru Git - kernel.git/commit
rhashtable: fix a memory leak in alloc_bucket_locks()
authorEric Dumazet <edumazet@google.com>
Fri, 26 Aug 2016 15:51:39 +0000 (08:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Aug 2016 04:59:53 +0000 (21:59 -0700)
commit2894ed4dca45dac4228752e4739733d6215448e0
tree8247a2cd0567720c777833fa320686bacbec8132
parent4d4853e8fd78630b09674bcdc880881b930f3faf
rhashtable: fix a memory leak in alloc_bucket_locks()

If vmalloc() was successful, do not attempt a kmalloc_array()

Fixes: 4d67efc5afd1 ("rhashtable: avoid large lock-array allocations")
Reported-by: CAI Qian <caiqian@redhat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Florian Westphal <fw@strlen.de>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: CAI Qian <caiqian@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/rhashtable.c