From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934306AbcIOIvL (ORCPT ); Thu, 15 Sep 2016 04:51:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41526 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934269AbcIOIvJ (ORCPT ); Thu, 15 Sep 2016 04:51:09 -0400 From: Baoquan He To: joro@8bytes.org Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, dyoung@redhat.com, xlpang@redhat.com, Vincent.Wan@amd.com, Baoquan He Subject: [PATCH 3/4] iommu/amd: Free domain id when free a domain of struct dma_ops_domain Date: Thu, 15 Sep 2016 16:50:52 +0800 Message-Id: <1473929453-3533-4-git-send-email-bhe@redhat.com> In-Reply-To: <1473929453-3533-1-git-send-email-bhe@redhat.com> References: <1473929453-3533-1-git-send-email-bhe@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 15 Sep 2016 08:51:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current code missed freeing domain id when free a domain of struct dma_ops_domain. Signed-off-by: Baoquan He --- 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 160fc6a..a9f78c2 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -1655,6 +1655,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); } -- 2.5.5