summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>2019-01-14 13:38:43 +0300
committerDavid S. Miller <davem@davemloft.net>2019-01-16 13:39:18 -0800
commit01b833ab44c9e484060aad72267fc7e71beb559b (patch)
tree1ba86553f3dcb6878e64ed56ea381bf961e9c53c /net
parent400b8b9a2a17918f8ce00786f596f530e7f30d50 (diff)
downloadlinux-01b833ab44c9e484060aad72267fc7e71beb559b.tar.gz
linux-01b833ab44c9e484060aad72267fc7e71beb559b.tar.bz2
linux-01b833ab44c9e484060aad72267fc7e71beb559b.zip
net/core/neighbour: fix kmemleak minimal reference count for hash tables
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>
Diffstat (limited to 'net')
-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 3e27a779f288..96fdc9134726 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -450,7 +450,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);