summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>2019-01-14 13:38:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-05 17:27:05 +0300
commit2bc7d134284b0a116655d15beb0ee4721c2df882 (patch)
treef172d4b67e81c6bcae3ad2e0aa602263c9106294 /net/core
parentbe840860328cf9c4c0d9462d8f7379336617d05b (diff)
downloadlinux-2bc7d134284b0a116655d15beb0ee4721c2df882.tar.xz
net/core/neighbour: fix kmemleak minimal reference count for hash tables
[ Upstream commit 01b833ab44c9e484060aad72267fc7e71beb559b ] This should be 1 for normal allocations, 0 disables leak reporting. Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Reported-by: Cong Wang <xiyou.wangcong@gmail.com> Fixes: 85704cb8dcfd ("net/core/neighbour: tell kmemleak about hash tables") Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/neighbour.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index bba672482a0e..8aef689b8f32 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -332,7 +332,7 @@ static struct neigh_hash_table *neigh_hash_alloc(unsigned int shift)
buckets = (struct neighbour __rcu **)
__get_free_pages(GFP_ATOMIC | __GFP_ZERO,
get_order(size));
- kmemleak_alloc(buckets, size, 0, GFP_ATOMIC);
+ kmemleak_alloc(buckets, size, 1, GFP_ATOMIC);
}
if (!buckets) {
kfree(ret);