]> git.baikalelectronics.ru Git - kernel.git/commit
intel-iommu: Fix oops with intel_iommu=igfx_off
authorDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 2 Dec 2009 10:18:30 +0000 (10:18 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 8 Dec 2009 10:03:06 +0000 (10:03 +0000)
commit50ce9832f0491a46c2ce7a4d1f5b47c0fc4a6c19
tree63eb3d5b97569d4db7fa3eb47201d77eaaccaf46
parentf8501da5a1b1ca59253e7e55de891e962e1d49fe
intel-iommu: Fix oops with intel_iommu=igfx_off

The hotplug notifier will call find_domain() to see if the device in
question has been assigned an IOMMU domain. However, this should never
be called for devices with a "dummy" domain, such as graphics devices
when intel_iommu=igfx_off is set and the corresponding IOMMU isn't even
initialised. If you do that, it'll oops as it dereferences the (-1)
pointer.

The notifier function should check iommu_no_mapping() for the
device before doing anything else.

Cc: stable@kernel.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/pci/intel-iommu.c