浏览代码

drm/nouveau/platform: release IOMMU's mm upon exit

nvkm_mm_fini() was not called when exiting the driver, resulting in a
memory leak. Fix this.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot 10 年之前
父节点
当前提交
25eb3a924f
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/gpu/drm/nouveau/nouveau_platform.c

+ 1 - 0
drivers/gpu/drm/nouveau/nouveau_platform.c

@@ -152,6 +152,7 @@ static void nouveau_platform_remove_iommu(struct device *dev,
 					  struct nouveau_platform_gpu *gpu)
 {
 	if (gpu->iommu.domain) {
+		nvkm_mm_fini(&gpu->iommu._mm);
 		iommu_detach_device(gpu->iommu.domain, dev);
 		iommu_domain_free(gpu->iommu.domain);
 	}