Commit 157dbc4a authored by Sebastian Ott's avatar Sebastian Ott Committed by Oliver Upton
Browse files

KVM: arm64: Fix uninitialized memcache pointer in user_mem_abort()



Commit fce886a6 ("KVM: arm64: Plumb the pKVM MMU in KVM") made the
initialization of the local memcache variable in user_mem_abort()
conditional, leaving a codepath where it is used uninitialized via
kvm_pgtable_stage2_map().

This can fail on any path that requires a stage-2 allocation
without transition via a permission fault or dirty logging.

Fix this by making sure that memcache is always valid.

Fixes: fce886a6 ("KVM: arm64: Plumb the pKVM MMU in KVM")
Signed-off-by: default avatarSebastian Ott <sebott@redhat.com>
Reviewed-by: default avatarMarc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/kvmarm/3f5db4c7-ccce-fb95-595c-692fa7aad227@redhat.com/
Link: https://lore.kernel.org/r/20250505173148.33900-1-sebott@redhat.com


Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
parent b4432656
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment