diff options
author | Liu Xiang <liuxiang_1999@126.com> | 2019-09-16 16:53:00 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2019-10-01 14:13:16 +0300 |
commit | 6db7bfb431220d78e34d2d0afdb7c12683323588 (patch) | |
tree | de27615399d325ff46a3d8f7f762bf334e187bd3 /drivers/iommu | |
parent | 54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c (diff) | |
download | linux-6db7bfb431220d78e34d2d0afdb7c12683323588.tar.xz |
iommu/arm-smmu: Free context bitmap in the err path of arm_smmu_init_domain_context
When alloc_io_pgtable_ops is failed, context bitmap which is just allocated
by __arm_smmu_alloc_bitmap should be freed to release the resource.
Signed-off-by: Liu Xiang <liuxiang_1999@126.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/arm-smmu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index b18aac4c105e..7c503a6bc585 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -812,6 +812,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, return 0; out_clear_smmu: + __arm_smmu_free_bitmap(smmu->context_map, cfg->cbndx); smmu_domain->smmu = NULL; out_unlock: mutex_unlock(&smmu_domain->init_mutex); |