aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2019-03-06 17:50:08 -0500
committerJoerg Roedel <jroedel@suse.de>2019-04-11 08:51:37 -0400
commit4f97031ff8605c1e8388a650bc5708ceda4357d5 (patch)
tree32042b20d3fa9ec809b04762ede5cc36420a43a8
parent43a0541e312f7136e081e6bf58f6c8a2e9672688 (diff)
iommu/tegra-smmu: Properly release domain resources
Release all memory allocations associated with a released domain and emit warning if domain is in-use at the time of destruction. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--drivers/iommu/tegra-smmu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 8d30653cd13a..27b1249f0773 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -327,6 +327,9 @@ static void tegra_smmu_domain_free(struct iommu_domain *domain)
327 327
328 /* TODO: free page directory and page tables */ 328 /* TODO: free page directory and page tables */
329 329
330 WARN_ON_ONCE(as->use_count);
331 kfree(as->count);
332 kfree(as->pts);
330 kfree(as); 333 kfree(as);
331} 334}
332 335