Blob Blame History Raw
From: Marek Szyprowski <m.szyprowski@samsung.com>
Date: Mon, 9 Oct 2017 13:40:23 +0200
Subject: iommu/exynos: Remove initconst attribute to avoid potential kernel
 oops
Git-commit: 9d25e3cc83d731ae4eeb017fd07562fde3f80bef
Patch-mainline: v4.14-rc5
References: bsc#975772

Exynos SYSMMU registers standard platform device with sysmmu_of_match
table, what means that this table is accessed every time a new platform
device is registered in a system. This might happen also after the boot,
so the table must not be attributed as initconst to avoid potential kernel
oops caused by access to freed memory.

Fixes: 6b21a5db3642 ("iommu/exynos: Support for device tree")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/iommu/exynos-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -706,7 +706,7 @@ static const struct dev_pm_ops sysmmu_pm
 				pm_runtime_force_resume)
 };
 
-static const struct of_device_id sysmmu_of_match[] __initconst = {
+static const struct of_device_id sysmmu_of_match[] = {
 	{ .compatible	= "samsung,exynos-sysmmu", },
 	{ },
 };