mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 21:33:52 +00:00
ARM: EXYNOS: Fix potentian kfree() of ro memory
The change fixes a bug introduced by2be2a3ff42
, 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:2be2a3ff42
("ARM: EXYNOS: register power domain driver from core_initcall") Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
This commit is contained in:
parent
d770e558e2
commit
27bbd23fe8
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ static __init int exynos4_pm_init_power_domain(void)
|
|||
pd->base = of_iomap(np, 0);
|
||||
if (!pd->base) {
|
||||
pr_warn("%s: failed to map memory\n", __func__);
|
||||
kfree(pd->pd.name);
|
||||
kfree_const(pd->pd.name);
|
||||
kfree(pd);
|
||||
of_node_put(np);
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue