summaryrefslogtreecommitdiffstats
path: root/lib/dhry_2.c
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2023-03-16 17:45:45 +0000
committerOliver Upton <oliver.upton@linux.dev>2023-03-16 23:42:56 +0000
commite86fc1a3a3e9b4850fe74d738e3cfcf4297d8bba (patch)
tree8410fd952f117ae041367126894dd8e05c9c26a3 /lib/dhry_2.c
parent13ec9308a85702af7c31f3638a2720863848a7f2 (diff)
downloadlinux-stable-e86fc1a3a3e9b4850fe74d738e3cfcf4297d8bba.tar.gz
linux-stable-e86fc1a3a3e9b4850fe74d738e3cfcf4297d8bba.tar.bz2
linux-stable-e86fc1a3a3e9b4850fe74d738e3cfcf4297d8bba.zip
KVM: arm64: Disable interrupts while walking userspace PTs
We walk the userspace PTs to discover what mapping size was used there. However, this can race against the userspace tables being freed, and we end-up in the weeds. Thankfully, the mm code is being generous and will IPI us when doing so. So let's implement our part of the bargain and disable interrupts around the walk. This ensures that nothing terrible happens during that time. We still need to handle the removal of the page tables before the walk. For that, allow get_user_mapping_size() to return an error, and make sure this error can be propagated all the way to the the exit handler. Signed-off-by: Marc Zyngier <maz@kernel.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230316174546.3777507-2-maz@kernel.org Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'lib/dhry_2.c')
0 files changed, 0 insertions, 0 deletions