Skip to content

Commit

Permalink
iommu/amd: Free domain id when free a domain of struct dma_ops_domain
Browse files Browse the repository at this point in the history
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: ec487d1 ('x86, AMD IOMMU: add domain allocation and deallocation functions')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Baoquan He authored and Joerg Roedel committed Sep 19, 2016
1 parent 5c87f62 commit c3db901
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit c3db901

Please sign in to comment.