linux/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 Thermal: Enable Broxton SoC thermal reporting device 2015-12-29 16:17:53 +08:00
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 imx: thermal: use CPU temperature grade info for thresholds 2015-11-23 16:38:40 -08:00
intel_pch_thermal.c thermal: constify pch_dev_ops structure 2015-12-29 16:16:31 +08:00
intel_powerclamp.c
intel_quark_dts_thermal.c x86/platform/iosf_mbi: Remove duplicate definitions 2015-12-09 01:18:34 +01:00
intel_soc_dts_iosf.c x86/platform/iosf_mbi: Remove duplicate definitions 2015-12-09 01:18:34 +01:00
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 thermal: of: use for_each_available_child_of_node for child iterator 2016-02-09 14:01:18 -08:00
power_allocator.c thermal: power_allocator: Use temperature reading from tz 2015-11-12 10:47:24 -08:00
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 thermal: rockchip: Support the RK3399 SoCs in thermal driver 2016-01-06 18:06:38 -08:00
spear_thermal.c thermal: spear: use __maybe_unused for PM functions 2016-02-09 14:12:08 -08:00
step_wise.c Thermal: initialize thermal zone device correctly 2015-12-29 15:59:44 +08:00
tegra_soctherm.c
thermal_core.c Merge branches 'thermal-intel', 'thermal-suspend-fix' and 'thermal-soc' into next 2016-01-23 11:43:27 +08:00
thermal_core.h Thermal: initialize thermal zone device correctly 2015-12-29 15:59:44 +08:00
thermal_hwmon.c
thermal_hwmon.h
user_space.c
x86_pkg_temp_thermal.c