iommu/vt-d: Check for NULL pointer in dmar_acpi_dev_scope_init()
authorJoerg Roedel <joro@8bytes.org>
Tue, 25 Mar 2014 19:16:40 +0000 (20:16 +0100)
committerJoerg Roedel <joro@8bytes.org>
Tue, 25 Mar 2014 19:36:09 +0000 (20:36 +0100)
When ir_dev_scope_init() is called via a rootfs initcall it
will check for irq_remapping_enabled before it calls
(indirectly) into dmar_acpi_dev_scope_init() which uses the
dmar_tbl pointer without any checks.

The AMD IOMMU driver also sets the irq_remapping_enabled
flag which causes the dmar_acpi_dev_scope_init() function to
be called on systems with AMD IOMMU hardware too, causing a
boot-time kernel crash.

Signed-off-by: Joerg Roedel <joro@8bytes.org>
drivers/iommu/dmar.c

Simple merge