[PATCH 2/3] x86: intremap: Fix get_irte() NULL-pointer assignment

From: Alexander Gordeev
Date: Wed May 09 2012 - 10:45:52 EST


Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx>
---
drivers/iommu/intr_remapping.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/iommu/intr_remapping.c b/drivers/iommu/intr_remapping.c
index 6777ca0..adb0818 100644
--- a/drivers/iommu/intr_remapping.c
+++ b/drivers/iommu/intr_remapping.c
@@ -68,7 +68,7 @@ int get_irte(int irq, struct irte *entry)
unsigned long flags;
int index;

- if (!entry || !irq_iommu)
+ if (!entry || !irq_iommu || !irq_iommu->iommu)
return -1;

raw_spin_lock_irqsave(&irq_2_ir_lock, flags);
--
1.7.6.5


--xgyAXRrhYN0wYx8y
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="0003-x86-intremap-Dump-IRTEs-to-sys-kernel-intremap.patch"