drm/etnaviv: fix MMU context leak on GPU reset
authorLucas Stach <l.stach@pengutronix.de>
Fri, 20 Aug 2021 20:18:28 +0000 (22:18 +0200)
committerDom Cobley <popcornmix@gmail.com>
Thu, 14 Oct 2021 11:32:54 +0000 (12:32 +0100)
commited443f63b108f73869df8eb4afe1d34d082f9cec
tree2dc8c2ccfffa231a3ce45755458a390d228b841f
parent904e79df4237b8d884d78cd9c7a185a20647b1be
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: Michael Walle <michael@walle.cc>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Michael Walle <michael@walle.cc>
Tested-by: Marek Vasut <marex@denx.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/etnaviv/etnaviv_gpu.c