瀏覽代碼

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>
Baoquan He 9 年之前
父節點
當前提交
c3db901c54
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/iommu/amd_iommu.c

+ 3 - 0
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);
 }