Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5827dbac authored by Lucas Stach's avatar Lucas Stach Committed by Greg Kroah-Hartman
Browse files

drm/etnaviv: fix MMU context leak on GPU reset



commit f978a5302f5566480c58ffae64a16d34456801bd upstream.

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: stable@vger.kernel.org # 5.4
Reported-by: default avatarMichael Walle <michael@walle.cc>
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Tested-by: default avatarMichael Walle <michael@walle.cc>
Tested-by: default avatarMarek Vasut <marex@denx.de>
Reviewed-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5e67b384
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -547,6 +547,8 @@ static int etnaviv_hw_reset(struct etnaviv_gpu *gpu)

	gpu->fe_running = false;
	gpu->exec_state = -1;
	if (gpu->mmu_context)
		etnaviv_iommu_context_put(gpu->mmu_context);
	gpu->mmu_context = NULL;

	return 0;