Return-Path: Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Joerg Roedel" , "Baoquan He" Date: Wed, 15 Feb 2017 22:41:34 +0000 Message-ID: Subject: [PATCH 3.2 021/126] iommu/amd: Free domain id when free a domain of struct dma_ops_domain In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.2.85-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Baoquan He commit c3db901c54466a9c135d1e6e95fec452e8a42666 upstream. The current code missed freeing domain id when free a domain of struct dma_ops_domain. Signed-off-by: Baoquan He Fixes: ec487d1a110a ('x86, AMD IOMMU: add domain allocation and deallocation functions') Signed-off-by: Joerg Roedel Signed-off-by: Ben Hutchings --- drivers/iommu/amd_iommu.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -1541,6 +1541,9 @@ static void dma_ops_domain_free(struct d kfree(dom->aperture[i]); } + if (dom->domain.id) + domain_id_free(dom->domain.id); + kfree(dom); }