Commit c214c8dd authored by Baoquan He's avatar Baoquan He Committed by Luis Henriques

iommu/amd: Free domain id when free a domain of struct dma_ops_domain

BugLink: http://bugs.launchpad.net/bugs/1642968

commit c3db901c upstream.

The current code missed freeing domain id when free a domain of
struct dma_ops_domain.
Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
Fixes: ec487d1a ('x86, AMD IOMMU: add domain allocation and deallocation functions')
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 0a9718f7
...@@ -1833,6 +1833,9 @@ static void dma_ops_domain_free(struct dma_ops_domain *dom) ...@@ -1833,6 +1833,9 @@ static void dma_ops_domain_free(struct dma_ops_domain *dom)
kfree(dom->aperture[i]); kfree(dom->aperture[i]);
} }
if (dom->domain.id)
domain_id_free(dom->domain.id);
kfree(dom); kfree(dom);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment