From patchwork Thu Apr 8 18:58:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 91359 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o38J2Sgg020340 for ; Thu, 8 Apr 2010 19:02:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933152Ab0DHTBT (ORCPT ); Thu, 8 Apr 2010 15:01:19 -0400 Received: from rcsinet12.oracle.com ([148.87.113.124]:63785 "EHLO rcsinet12.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933128Ab0DHTBQ (ORCPT ); Thu, 8 Apr 2010 15:01:16 -0400 Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet12.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o38J0nDR016809 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Apr 2010 19:01:05 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o38CI7VC016551; Thu, 8 Apr 2010 19:00:47 GMT Received: from abhmt008.oracle.com by acsmt355.oracle.com with ESMTP id 158893421270753192; Thu, 08 Apr 2010 11:59:52 -0700 Received: from localhost.localdomain (/10.6.76.26) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 08 Apr 2010 11:59:52 -0700 From: Yinghai Lu To: Jesse Barnes , Chris Wright , David.Woodhouse@intel.com Cc: fenghua.yu@intel.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org, Yinghai Lu Subject: [PATCH 6/6] intel-iommu: Don't call domain_exit if can not attach with iommu Date: Thu, 8 Apr 2010 11:58:27 -0700 Message-Id: <1270753107-15881-7-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.6.4.2 In-Reply-To: <1270753107-15881-1-git-send-email-yinghai@kernel.org> References: <1270753107-15881-1-git-send-email-yinghai@kernel.org> X-Source-IP: acsmt353.oracle.com [141.146.40.153] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090208.4BBE27E0.01F6,ss=1,fgs=0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 08 Apr 2010 19:02:31 +0000 (UTC) diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 7dddc7c..c112e5d 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -1853,7 +1853,7 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw) ret = iommu_attach_domain(domain, iommu); if (ret) { - domain_exit(domain); + free_domain_mem(domain); goto error; }