[PATCH v2] KVM: arm64: Take the SRCU lock for page table walks in fault injection and AT emulation

Oliver Upton oupton at kernel.org
Wed Jun 3 16:07:50 PDT 2026


On Wed, Jun 03, 2026 at 09:09:33PM +0900, Hyunwoo Kim wrote:
> walk_s1() and kvm_walk_nested_s2() expect to be called while holding
> kvm->srcu to guard against memslot changes. While this is generally
> the case, __kvm_at_s12() and __kvm_find_s1_desc_level() call into the
> respective walkers without taking kvm->srcu.
> 
> Fix by acquiring kvm->srcu prior to the table walk in both instances.
> 
> Cc: stable at vger.kernel.org
> Fixes: 50f77dc87f13 ("KVM: arm64: Populate level on S1PTW SEA injection")
> Fixes: be04cebf3e78 ("KVM: arm64: nv: Add emulation of AT S12E{0,1}{R,W}")
> Suggested-by: Oliver Upton <oupton at kernel.org>
> Signed-off-by: Hyunwoo Kim <imv4bel at gmail.com>

Reviewed-by: Oliver Upton <oupton at kernel.org>

-- 
Thanks,
Oliver



More information about the linux-arm-kernel mailing list