Skip to content
Commit 07313a2b authored by Yee Lee's avatar Yee Lee Committed by akpm
Browse files

mm: kfence: apply kmemleak_ignore_phys on early allocated pool

This patch solves two issues.

(1) The pool allocated by memblock needs to unregister from
kmemleak scanning. Apply kmemleak_ignore_phys to replace the
original kmemleak_free as its address now is stored in the phys tree.

(2) The pool late allocated by page-alloc doesn't need to unregister.
Move out the freeing operation from its call path.

Link: https://lkml.kernel.org/r/20220628113714.7792-2-yee.lee@mediatek.com
Fixes: 0c24e061

 ("mm: kmemleak: add rbtree and store physical address for objects allocated with PA")
Signed-off-by: default avatarYee Lee <yee.lee@mediatek.com>
Suggested-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Suggested-by: default avatarMarco Elver <elver@google.com>
Reviewed-by: default avatarMarco Elver <elver@google.com>
Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 14c99d65
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment