[PATCH 0/2] kmemleak: support for percpu memory leak detect

From: Pavel Tikhomirov
Date: Thu Jul 25 2024 - 00:13:02 EST


This is a rework of this series:
https://lore.kernel.org/lkml/20200921020007.35803-1-chenjun102@xxxxxxxxxx/

Originally I was investigating a percpu leak on our customer nodes and
having this functionality was a huge help, which lead to this fix [1].

So probably it's a good idea to have it in mainstream too, especially as
after [2] it became much easier to implement (we already have a separate
tree for percpu pointers).

commit 0af8c09c89681 ("netfilter: x_tables: fix percpu counter block
leak on error path when creating new netns") [1]
commit 39042079a0c24 ("kmemleak: avoid RCU stalls when freeing metadata
for per-CPU pointers") [2]

Pavel Tikhomirov (2):
kmemleak: enable tracking for percpu pointers
kmemleak-test: add percpu leak

mm/kmemleak.c | 153 +++++++++++++++++++------------
samples/kmemleak/kmemleak-test.c | 2 +
2 files changed, 96 insertions(+), 59 deletions(-)

--
2.45.2