Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754212AbcKYIzf (ORCPT ); Fri, 25 Nov 2016 03:55:35 -0500 Received: from mx2.suse.de ([195.135.220.15]:45310 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753038AbcKYIbt (ORCPT ); Fri, 25 Nov 2016 03:31:49 -0500 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Baoquan He , Joerg Roedel , Jiri Slaby Subject: [PATCH 3.12 062/127] iommu/amd: Free domain id when free a domain of struct dma_ops_domain Date: Fri, 25 Nov 2016 09:29:35 +0100 Message-Id: <1fd4c5e383c44934691f1d2fb356a8533591fa8e.1480062521.git.jslaby@suse.cz> X-Mailer: git-send-email 2.10.2 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 947 Lines: 35 From: Baoquan He 3.12-stable review patch. If anyone has any objections, please let me know. =============== 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: Jiri Slaby --- drivers/iommu/amd_iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 73353a97aafb..71f9cd108590 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2032,6 +2032,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); } -- 2.10.2