diff options
author | Baoquan He <bhe@redhat.com> | 2016-09-15 11:50:52 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2016-09-19 16:49:01 +0300 |
commit | c3db901c54466a9c135d1e6e95fec452e8a42666 (patch) | |
tree | 41aca85b2210e0be32f74e56da1831add7f18e90 /drivers/iommu | |
parent | 5c87f62dd1ea9dab8101a020fa2c6ab47c37797e (diff) | |
download | linux-c3db901c54466a9c135d1e6e95fec452e8a42666.tar.xz |
iommu/amd: Free domain id when free a domain of struct dma_ops_domain
The current code missed freeing domain id when free a domain of
struct dma_ops_domain.
Signed-off-by: Baoquan He <bhe@redhat.com>
Fixes: ec487d1a110a ('x86, AMD IOMMU: add domain allocation and deallocation functions')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd_iommu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 897940c79a54..b5b117b44026 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -1723,6 +1723,9 @@ static void dma_ops_domain_free(struct dma_ops_domain *dom) free_pagetable(&dom->domain); + if (dom->domain.id) + domain_id_free(dom->domain.id); + kfree(dom); } |