aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
diff options
context:
space:
mode:
authorYanan Wang <[email protected]>2020-12-01 20:10:32 +0000
committerMarc Zyngier <[email protected]>2020-12-02 09:42:24 +0000
commit5c646b7e1d8bcb12317426287c516dfa4c5171c2 (patch)
treee898f5189dcf00d995c7c7b36a9c8a29298167b3 /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
parentKVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace (diff)
downloadkernel-5c646b7e1d8bcb12317426287c516dfa4c5171c2.tar.gz
kernel-5c646b7e1d8bcb12317426287c516dfa4c5171c2.zip
KVM: arm64: Fix memory leak on stage2 update of a valid PTE
When installing a new leaf PTE onto an invalid ptep, we need to get_page(ptep) to account for the new mapping. However, simply updating a valid PTE shouldn't result in any additional refcounting, as there is new mapping. This otherwise results in a page being forever wasted. Address this by fixing-up the refcount in stage2_map_walker_try_leaf() if the PTE was already valid, balancing out the later get_page() in stage2_map_walk_leaf(). Signed-off-by: Yanan Wang <[email protected]> [maz: update commit message, add comment in the code] Signed-off-by: Marc Zyngier <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c')
0 files changed, 0 insertions, 0 deletions