diff options
| author | Vladimir Zapolskiy <vz@mleia.com> | 2015-07-30 20:09:49 -0400 |
|---|---|---|
| committer | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2015-07-30 21:11:25 -0400 |
| commit | 27bbd23fe8e66edfff4c0e92eb9eb39c37856831 (patch) | |
| tree | ff9b669a9f9b28eeb858a8227c721456d026c0e9 | |
| parent | d770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (diff) | |
ARM: EXYNOS: Fix potentian kfree() of ro memory
The change fixes a bug introduced by 2be2a3ff42a5, memory allocated
by kstrdup_const() must be always deallocated with kfree_const(),
otherwise there is a risk of kfree'ing ro memory in power domain error
exit path.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Cc: <stable@vger.kernel.org>
Fixes: 2be2a3ff42a5 ("ARM: EXYNOS: register power domain driver from core_initcall")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
| -rw-r--r-- | arch/arm/mach-exynos/pm_domains.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index 6001f1c9d136..5121baae0e6b 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c | |||
| @@ -146,7 +146,7 @@ static __init int exynos4_pm_init_power_domain(void) | |||
| 146 | pd->base = of_iomap(np, 0); | 146 | pd->base = of_iomap(np, 0); |
| 147 | if (!pd->base) { | 147 | if (!pd->base) { |
| 148 | pr_warn("%s: failed to map memory\n", __func__); | 148 | pr_warn("%s: failed to map memory\n", __func__); |
| 149 | kfree(pd->pd.name); | 149 | kfree_const(pd->pd.name); |
| 150 | kfree(pd); | 150 | kfree(pd); |
| 151 | of_node_put(np); | 151 | of_node_put(np); |
| 152 | continue; | 152 | continue; |
