[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1364451550.4448.1.camel@phoenix>
Date: Thu, 28 Mar 2013 14:19:10 +0800
From: Axel Lin <axel.lin@...ics.com>
To: Kukjin Kim <kgene.kim@...sung.com>
Cc: Joerg Roedel <joerg.roedel@....com>,
KyongHo Cho <pullip.cho@...sung.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] iommu: exynos: Fix out of bound array access
In the case of no-match in "for (i = 0; i < (pdev->num_resources / 2); i++)",
i is "pdev->num_resources / 2". Fix the boundary checking to avoid the out of
bound array access for data->sfrbases[i].
Signed-off-by: Axel Lin <axel.lin@...ics.com>
---
drivers/iommu/exynos-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 238a3ca..de04e6a 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -357,7 +357,7 @@ static irqreturn_t exynos_sysmmu_irq(int irq, void *dev_id)
break;
}
- if (i == pdev->num_resources) {
+ if (i == pdev->num_resources / 2) {
itype = SYSMMU_FAULT_UNKNOWN;
} else {
itype = (enum exynos_sysmmu_inttype)
--
1.7.10.4
--
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