]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - mm/kmemleak.c
mm: kmemleak: use mem_pool_free() to free object
authorLiu Shixin <liushixin2@huawei.com>
Wed, 18 Oct 2023 10:29:50 +0000 (18:29 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 25 Oct 2023 23:47:13 +0000 (16:47 -0700)
commit2e1d47385f98aa0fa7d71aeee32d26cc6f8493e0
tree277eb7135b314fb68c3621981cead0b6356ec78a
parent0edd7b58293340d26380d7510fd4fc08e5902511
mm: kmemleak: use mem_pool_free() to free object

The kmemleak object is allocated by mem_pool_alloc(), which could be from
slab or mem_pool[], so it's not suitable using __kmem_cache_free() to free
the object, use __mem_pool_free() instead.

Link: https://lkml.kernel.org/r/20231018102952.3339837-6-liushixin2@huawei.com
Fixes: 0647398a8c7b ("mm: kmemleak: simple memory allocation pool for kmemleak objects")
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Patrick Wang <patrick.wang.shcn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/kmemleak.c