提交 f2faea8b 编写于 作者: L Lucas Stach

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: NLucas Stach <l.stach@pengutronix.de>
Tested-by: NMichael Walle <michael@walle.cc>
Tested-by: NMarek Vasut <marex@denx.de>
Reviewed-by: NChristian Gmeiner <christian.gmeiner@gmail.com>
上级 d6408538
...@@ -199,6 +199,7 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu_context *context, ...@@ -199,6 +199,7 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu_context *context,
*/ */
list_for_each_entry_safe(m, n, &list, scan_node) { list_for_each_entry_safe(m, n, &list, scan_node) {
etnaviv_iommu_remove_mapping(context, m); etnaviv_iommu_remove_mapping(context, m);
etnaviv_iommu_context_put(m->context);
m->context = NULL; m->context = NULL;
list_del_init(&m->mmu_node); list_del_init(&m->mmu_node);
list_del_init(&m->scan_node); list_del_init(&m->scan_node);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册