linux_dsm_epyc7002/drivers/thermal
Javi Merino a53b8394ec thermal: cpu_cooling: fix out of bounds access in time_in_idle
In __cpufreq_cooling_register() we allocate the arrays for time_in_idle
and time_in_idle_timestamp to be as big as the number of cpus in this
cpufreq device.  However, in get_load() we access this array using the
cpu number as index, which can result in an out of bound access.

Index time_in_idle{,_timestamp} using the index in the cpufreq_device's
allowed_cpus mask, as we do for the load_cpu array in
cpufreq_get_requested_power()

Reported-by: Nicolas Boichat <drinkcat@chromium.org>
Cc: Amit Daniel Kachhap <amit.kachhap@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2016-02-11 07:13:29 -08:00
..
int340x_thermal
samsung
st
ti-soc-thermal
armada_thermal.c
clock_cooling.c
cpu_cooling.c thermal: cpu_cooling: fix out of bounds access in time_in_idle 2016-02-11 07:13:29 -08:00
db8500_cpufreq_cooling.c
db8500_thermal.c
devfreq_cooling.c
dove_thermal.c
fair_share.c
gov_bang_bang.c
hisi_thermal.c
imx_thermal.c
intel_pch_thermal.c
intel_powerclamp.c
intel_quark_dts_thermal.c
intel_soc_dts_iosf.c
intel_soc_dts_iosf.h
intel_soc_dts_thermal.c
Kconfig thermal: allow u8500-thermal driver to be a module 2016-02-09 14:18:23 -08:00
kirkwood_thermal.c
Makefile
of-thermal.c
power_allocator.c
qcom-spmi-temp-alarm.c
rcar_thermal.c thermal: rcar: enable to use thermal-zone on DT 2016-02-09 14:05:11 -08:00
rockchip_thermal.c
spear_thermal.c thermal: spear: use __maybe_unused for PM functions 2016-02-09 14:12:08 -08:00
step_wise.c
tegra_soctherm.c
thermal_core.c
thermal_core.h
thermal_hwmon.c
thermal_hwmon.h
user_space.c
x86_pkg_temp_thermal.c