diff options
author | Baoquan He <bhe@redhat.com> | 2016-09-15 16:50:52 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-18 10:48:36 +0100 |
commit | f029e7b34f25cb1cc6ff46d48dfa2a458611b7a9 (patch) | |
tree | 317cf8cb1e40202deafd2588ac879f1fa3395c42 | |
parent | f5bb84163704abf1ecc0d718a48ecb79caeda491 (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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 0397985a2601..5975d76ce755 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -1833,6 +1833,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); } |