[PATCH] KVM: arm64: Use kmemleak_free_part_phys() to unregister hyp_mem_base
Catalin Marinas
catalin.marinas at arm.com
Thu Sep 8 06:28:55 PDT 2022
On Thu, Sep 08, 2022 at 09:06:59PM +0800, Zenghui Yu wrote:
> With commit 0c24e061196c ("mm: kmemleak: add rbtree and store physical
> address for objects allocated with PA"), kmemleak started to put the
> objects allocated with physical address onto object_phys_tree_root tree.
> The kmemleak_free_part() therefore no longer worked as expected on
> physically allocated objects (hyp_mem_base in this case) as it attempted to
> search and remove things in object_tree_root tree.
>
> Fix it by using kmemleak_free_part_phys() to unregister hyp_mem_base. This
> fixes an immediate crash when booting a KVM host in protected mode with
> kmemleak enabled.
>
> Signed-off-by: Zenghui Yu <yuzenghui at huawei.com>
Acked-by: Catalin Marinas <catalin.marinas at arm.com>
More information about the linux-arm-kernel
mailing list