mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
net/core/neighbour: fix kmemleak minimal reference count for hash tables
[ Upstream commit01b833ab44] 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:85704cb8dc("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4f4594adee
commit
41feb09d50
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user