linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/core/neighbour: fix kmemleak minimal reference count for hash tables
@ 2019-01-14 10:38 Konstantin Khlebnikov
  2019-01-16 21:39 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Khlebnikov @ 2019-01-14 10:38 UTC (permalink / raw)
  To: netdev, David S. Miller; +Cc: Cong Wang, LKML, Catalin Marinas

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")
---
 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);


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/core/neighbour: fix kmemleak minimal reference count for hash tables
  2019-01-14 10:38 [PATCH] net/core/neighbour: fix kmemleak minimal reference count for hash tables Konstantin Khlebnikov
@ 2019-01-16 21:39 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-01-16 21:39 UTC (permalink / raw)
  To: khlebnikov; +Cc: netdev, xiyou.wangcong, linux-kernel, catalin.marinas

From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Date: Mon, 14 Jan 2019 13:38:43 +0300

> 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")

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-16 21:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 10:38 [PATCH] net/core/neighbour: fix kmemleak minimal reference count for hash tables Konstantin Khlebnikov
2019-01-16 21:39 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).