diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2019-03-06 23:50:08 +0100 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2019-04-11 14:51:37 +0200 |
commit | 4f97031ff8605c1e8388a650bc5708ceda4357d5 (patch) | |
tree | 32042b20d3fa9ec809b04762ede5cc36420a43a8 /drivers/iommu/tegra-smmu.c | |
parent | iommu/tegra-smmu: Fix invalid ASID bits on Tegra30/114 (diff) | |
download | linux-4f97031ff8605c1e8388a650bc5708ceda4357d5.tar.xz linux-4f97031ff8605c1e8388a650bc5708ceda4357d5.zip |
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>
Diffstat (limited to 'drivers/iommu/tegra-smmu.c')
-rw-r--r-- | drivers/iommu/tegra-smmu.c | 3 |
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) /* TODO: free page directory and page tables */ + WARN_ON_ONCE(as->use_count); + kfree(as->count); + kfree(as->pts); kfree(as); } |