Commit 157dbc4
KVM: arm64: Fix uninitialized memcache pointer in user_mem_abort()
Commit fce886a ("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: fce886a ("KVM: arm64: Plumb the pKVM MMU in KVM")
Signed-off-by: Sebastian Ott <sebott@redhat.com>
Reviewed-by: Marc 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: Oliver Upton <oliver.upton@linux.dev>1 parent b443265 commit 157dbc4
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1501 | 1501 | | |
1502 | 1502 | | |
1503 | 1503 | | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
1504 | 1509 | | |
1505 | 1510 | | |
1506 | 1511 | | |
| |||
1510 | 1515 | | |
1511 | 1516 | | |
1512 | 1517 | | |
1513 | | - | |
1514 | | - | |
| 1518 | + | |
1515 | 1519 | | |
1516 | | - | |
1517 | | - | |
| 1520 | + | |
1518 | 1521 | | |
1519 | | - | |
| 1522 | + | |
1520 | 1523 | | |
1521 | 1524 | | |
1522 | 1525 | | |
| |||
0 commit comments