On 2023/9/25 23:14, Andrew Morton wrote: > On Mon, 25 Sep 2023 15:20:59 +0800 Jinjie Ruan <ruanjinjie@xxxxxxxxxx> wrote: > >> When CONFIG_DAMON_VADDR_KUNIT_TEST=y and making CONFIG_DEBUG_KMEMLEAK=y >> and CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y, the below memory leak is detected. >> >> Since commit 9f86d624292c ("mm/damon/vaddr-test: remove unnecessary >> variables"), the damon_destroy_ctx() is removed, but still call >> damon_new_target() and damon_new_region(), the damon_region which is >> allocated by kmem_cache_alloc() in damon_new_region() and the damon_target >> which is allocated by kmalloc in damon_new_target() are not freed. And the >> damon_region which is allocated in damon_new_region() in >> damon_set_regions() is also not freed. >> >> So use damon_destroy_target to free all the damon_regions and damon_target. >> >> ... >> >> Fixes: 9f86d624292c ("mm/damon/vaddr-test: remove unnecessary variables") >> Fixes: dae0087aeff4 ("mm/damon/vaddr: remove damon_va_apply_three_regions()") > > Can we please identify a single Fixes: target? Otherwise, how are > -stable tree maintainers to determine which kernels need the fix? Right!Thank you. Commit dae0087aeff4 just replaces damon_va_apply_three_regions() with damon_set_regions(),not first introduce damon_set_regions(). Sorry, there is a mistake. > > I'll go with 9f86d624292c for now.