[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <154746232378.234732.3976012997312897852.stgit@buzz>
Date: Mon, 14 Jan 2019 13:38:43 +0300
From: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
To: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Cc: Cong Wang <xiyou.wangcong@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Catalin Marinas <catalin.marinas@....com>
Subject: [PATCH] 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@...dex-team.ru>
Reported-by: Cong Wang <xiyou.wangcong@...il.com>
Fixes: 85704cb8dcfd ("net/core/neighbour: tell kmemleak about hash tables")
---
net/core/neighbour.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
Powered by blists - more mailing lists