]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ARM: exynos: Clear global variable on init error path
authorKrzysztof Kozlowski <krzk@kernel.org>
Tue, 24 Jul 2018 16:48:14 +0000 (18:48 +0200)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:48:39 +0000 (19:48 -0600)
commiteff2fa01e9ca70976a8b28fdb64a7b265b68ebe4
tree704307fd860610091afce4901d01323f7736a7c7
parentcb323861b792fdf15064967af524f71c1b96dd5a
ARM: exynos: Clear global variable on init error path

BugLink: https://bugs.launchpad.net/bugs/1836117
[ Upstream commit cd4806911cee3901bc2b5eb95603cf1958720b57 ]

For most of Exynos SoCs, Power Management Unit (PMU) address space is
mapped into global variable 'pmu_base_addr' very early when initializing
PMU interrupt controller.  A lot of other machine code depends on it so
when doing iounmap() on this address, clear the global as well to avoid
usage of invalid value (pointing to unmapped memory region).

Properly mapped PMU address space is a requirement for all other machine
code so this fix is purely theoretical.  Boot will fail immediately in
many other places after following this error path.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/arm/mach-exynos/suspend.c