]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Release mmap_lock when using VM_SHARED with MTE
authorQuentin Perret <qperret@google.com>
Tue, 5 Oct 2021 12:20:31 +0000 (13:20 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 5 Oct 2021 12:22:45 +0000 (13:22 +0100)
commitf76521ec91336363966ceaa6f866235b406c65d0
treefe3c1e6580ff2ccf37ff0b71010d9001fd2608b6
parent9e6dbc79af348f5c7f8a365a29648cf9cf583804
KVM: arm64: Release mmap_lock when using VM_SHARED with MTE

VM_SHARED mappings are currently forbidden in a memslot with MTE to
prevent two VMs racing to sanitise the same page. However, this check
is performed while holding current->mm's mmap_lock, but fails to release
it. Fix this by releasing the lock when needed.

Fixes: ef0072e156e4 ("KVM: arm64: Introduce MTE VM feature")
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211005122031.809857-1-qperret@google.com
arch/arm64/kvm/mmu.c