Skip to content

Commit f2faea8

Browse files
committed
drm/etnaviv: add missing MMU context put when reaping MMU mapping
When we forcefully evict a mapping from the the address space and thus the MMU context, the MMU context is leaked, as the mapping no longer points to it, so it doesn't get freed when the GEM object is destroyed. Add the mssing context put to fix the leak. Cc: stable@vger.kernel.org # 5.4 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>
1 parent d640853 commit f2faea8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/etnaviv/etnaviv_mmu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu_context *context,
199199
*/
200200
list_for_each_entry_safe(m, n, &list, scan_node) {
201201
etnaviv_iommu_remove_mapping(context, m);
202+
etnaviv_iommu_context_put(m->context);
202203
m->context = NULL;
203204
list_del_init(&m->mmu_node);
204205
list_del_init(&m->scan_node);

0 commit comments

Comments
 (0)