diff options
author | Fuad Tabba <tabba@google.com> | 2025-09-17 14:07:37 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2025-09-17 17:37:47 +0100 |
commit | 5f9466b50c1b4253d91abf81780b90a722133162 (patch) | |
tree | 40dc26de57f04b299a0928f22f048540e3900589 /rust/kernel/alloc/allocator_test.rs | |
parent | 6515c612e79949b17ef4b8c4180c07bbeaf01e4d (diff) |
KVM: arm64: Fix page leak in user_mem_abort()
The user_mem_abort() function acquires a page reference via
__kvm_faultin_pfn() early in its execution. However, the subsequent
checks for mismatched attributes between stage 1 and stage 2 mappings
would return an error code directly, bypassing the corresponding page
release.
Fix this by storing the error and releasing the unused page before
returning the error.
Fixes: 6d674e28f642 ("KVM: arm/arm64: Properly handle faulting of device mappings")
Fixes: 2a8dfab26677 ("KVM: arm64: Block cacheable PFNMAP mapping")
Signed-off-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'rust/kernel/alloc/allocator_test.rs')
0 files changed, 0 insertions, 0 deletions