1
0
Fork 0
alistair23-linux/drivers/firmware/psci
Gavin Shan 96002e7485 drivers/firmware/psci: Fix memory leakage in alloc_init_cpu_groups()
[ Upstream commit c377e67c62 ]

The CPU mask (@tmp) should be released on failing to allocate
@cpu_groups or any of its elements. Otherwise, it leads to memory
leakage because the CPU mask variable is dynamically allocated
when CONFIG_CPUMASK_OFFSTACK is enabled.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20200630075227.199624-1-gshan@redhat.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-29 10:18:28 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile drivers: firmware: psci: Move psci to separate directory 2019-04-12 10:59:37 +02:00
psci.c PSCI: cpuidle: Refactor CPU suspend power_state parameter handling 2019-08-09 17:51:39 +01:00
psci_checker.c drivers/firmware/psci: Fix memory leakage in alloc_init_cpu_groups() 2020-07-29 10:18:28 +02:00