lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <AF9CD7A487028E428749836D21102612201D323DBB@PA-EXMBX02.vmware.com>
Date:	Fri, 16 Jan 2009 15:54:12 -0800
From:	Bhavesh Davda <bhavesh@...are.com>
To:	"David.Woodhouse@...el.com" <David.Woodhouse@...el.com>,
	"mingo@...e.hu" <mingo@...e.hu>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] intel-iommu: intel_iommu_domain_alloc should check
 'dmar_disabled'


intel_iommu_domain_alloc() will try and iommu_alloc_domain(iommu),
which calls alloc_domain_mem() to allocate out of 'iommu_domain_cache'.
Unfortunately iommu_domain_cache will not be created if booted with
"intel_iommu=off", i.e. dmar_disabled = 1.

This fixes that.

Signed-off-by: Bhavesh P. Davda <bhavesh@...are.com>
---
 drivers/pci/intel-iommu.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 5c8baa4..06237a8 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2356,6 +2356,11 @@ struct dmar_domain *intel_iommu_domain_alloc(struct pci_dev *pdev)
        struct dmar_domain *domain;
        struct intel_iommu *iommu;

+       if (dmar_disabled) {
+               printk(KERN_ERR "intel_iommu_domain_alloc: Intel-IOMMU disabled\n");
+               return NULL;
+       }
+
        drhd = dmar_find_matched_drhd_unit(pdev);
        if (!drhd) {
                printk(KERN_ERR "intel_iommu_domain_alloc: drhd == NULL\n");
--
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ