diff options
author | Vasant Hegde <vasant.hegde@amd.com> | 2022-09-12 09:32:46 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2022-09-26 14:26:39 +0300 |
commit | 2455d6a46c2da5703752772f49d56142ccd50463 (patch) | |
tree | ae7de1cc7152cb67c6f539c6548871f1fa54cd74 /drivers | |
parent | 053bab4c220be7749b7d7e101d9d172f3991b21a (diff) | |
download | linux-2455d6a46c2da5703752772f49d56142ccd50463.tar.xz |
iommu/amd: Free domain ID after domain_flush_pages
free_io_pgtable_ops() path uses domain ID to flush pages. Hence
free domain ID after flushing everything.
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20220912063248.7909-4-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iommu/amd/iommu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index c55f4a129b1e..00d0f23b0c0a 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -2004,12 +2004,12 @@ static void protection_domain_free(struct protection_domain *domain) if (!domain) return; - if (domain->id) - domain_id_free(domain->id); - if (domain->iop.pgtbl_cfg.tlb) free_io_pgtable_ops(&domain->iop.iop.ops); + if (domain->id) + domain_id_free(domain->id); + kfree(domain); } |