Skip to content

Commit f978a53

Browse files
committed
drm/etnaviv: fix MMU context leak on GPU reset
After a reset the GPU is no longer using the MMU context and may be restarted with a different context. While the mmu_state proeprly was cleared, the context wasn't unreferenced, leading to a memory leak. Cc: [email protected] # 5.4 Reported-by: Michael Walle <[email protected]> Signed-off-by: Lucas Stach <[email protected]> Tested-by: Michael Walle <[email protected]> Tested-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
1 parent 725cbc7 commit f978a53

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/etnaviv/etnaviv_gpu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,8 @@ static int etnaviv_hw_reset(struct etnaviv_gpu *gpu)
571571

572572
gpu->fe_running = false;
573573
gpu->exec_state = -1;
574+
if (gpu->mmu_context)
575+
etnaviv_iommu_context_put(gpu->mmu_context);
574576
gpu->mmu_context = NULL;
575577

576578
return 0;

0 commit comments

Comments
 (0)