Revision 5a7e56a5d29071bcccd947dee6e3b9f8e4eb3309 authored by Viresh Kumar on 04 March 2014, 03:44:00 UTC, committed by Rafael J. Wysocki on 06 March 2014, 12:25:29 UTC
Policy must be fully initialized before it is being made available
for use by others. Otherwise cpufreq_cpu_get() would be able to grab
a half initialized policy structure that might not have affected_cpus
(for example) populated. Then, anybody accessing those fields will get
a wrong value and that will lead to unpredictable results.

In order to fix this, do all the necessary initialization before we
make the policy structure available via cpufreq_cpu_get(). That will
guarantee that any code accessing fields of the policy will get
correct data from them.

Reported-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
[rjw: Changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 999976e
History
File Mode Size
Kconfig -rw-r--r-- 3.2 KB
Makefile -rw-r--r-- 1.7 KB
acpi_pm.c -rw-r--r-- 6.4 KB
arm_arch_timer.c -rw-r--r-- 18.6 KB
arm_global_timer.c -rw-r--r-- 8.2 KB
bcm2835_timer.c -rw-r--r-- 4.0 KB
bcm_kona_timer.c -rw-r--r-- 5.4 KB
cadence_ttc_timer.c -rw-r--r-- 12.9 KB
clksrc-dbx500-prcmu.c -rw-r--r-- 2.4 KB
clksrc-of.c -rw-r--r-- 1.3 KB
cs5535-clockevt.c -rw-r--r-- 5.6 KB
cyclone.c -rw-r--r-- 2.9 KB
dummy_timer.c -rw-r--r-- 1.7 KB
dw_apb_timer.c -rw-r--r-- 11.0 KB
dw_apb_timer_of.c -rw-r--r-- 4.1 KB
em_sti.c -rw-r--r-- 9.5 KB
exynos_mct.c -rw-r--r-- 14.6 KB
i8253.c -rw-r--r-- 4.8 KB
metag_generic.c -rw-r--r-- 5.2 KB
mmio.c -rw-r--r-- 1.9 KB
moxart_timer.c -rw-r--r-- 4.2 KB
mxs_timer.c -rw-r--r-- 8.6 KB
nomadik-mtu.c -rw-r--r-- 7.3 KB
samsung_pwm_timer.c -rw-r--r-- 12.6 KB
scx200_hrt.c -rw-r--r-- 2.8 KB
sh_cmt.c -rw-r--r-- 21.2 KB
sh_mtu2.c -rw-r--r-- 9.2 KB
sh_tmu.c -rw-r--r-- 12.5 KB
sun4i_timer.c -rw-r--r-- 5.2 KB
tcb_clksrc.c -rw-r--r-- 10.0 KB
tegra20_timer.c -rw-r--r-- 6.2 KB
time-armada-370-xp.c -rw-r--r-- 7.9 KB
time-efm32.c -rw-r--r-- 6.4 KB
time-orion.c -rw-r--r-- 4.1 KB
timer-marco.c -rw-r--r-- 8.7 KB
timer-prima2.c -rw-r--r-- 6.3 KB
timer-sun5i.c -rw-r--r-- 5.0 KB
vf_pit_timer.c -rw-r--r-- 5.0 KB
vt8500_timer.c -rw-r--r-- 4.7 KB
zevio-timer.c -rw-r--r-- 5.6 KB

back to top