[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210920163916.274991706@linuxfoundation.org>
Date: Mon, 20 Sep 2021 18:43:07 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Michael Walle <michael@...le.cc>,
Lucas Stach <l.stach@...gutronix.de>,
Marek Vasut <marex@...x.de>,
Christian Gmeiner <christian.gmeiner@...il.com>
Subject: [PATCH 5.10 015/122] drm/etnaviv: fix MMU context leak on GPU reset
From: Lucas Stach <l.stach@...gutronix.de>
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@...r.kernel.org # 5.4
Reported-by: Michael Walle <michael@...le.cc>
Signed-off-by: Lucas Stach <l.stach@...gutronix.de>
Tested-by: Michael Walle <michael@...le.cc>
Tested-by: Marek Vasut <marex@...x.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@...il.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -563,6 +563,8 @@ static int etnaviv_hw_reset(struct etnav
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;
Powered by blists - more mailing lists