diff options
| author | Baoquan He <bhe@redhat.com> | 2016-09-15 16:50:52 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:57:48 +0200 |
| commit | 733647c4b0aa2e649f468854e54470ef4475f4b4 (patch) | |
| tree | 3317453f81308fd360f4665523035d4c03765d5e | |
| parent | 6cec73a838a6757bbf7c56c91f7215f2b50dd894 (diff) | |
iommu/amd: Free domain id when free a domain of struct dma_ops_domain
commit c3db901c54466a9c135d1e6e95fec452e8a42666 upstream.
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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
| -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 a3a056752..1c62c248d 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -1991,6 +1991,9 @@ static void dma_ops_domain_free(struct dma_ops_domain *dom) kfree(dom->aperture[i]); } + if (dom->domain.id) + domain_id_free(dom->domain.id); + kfree(dom); } |
