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-- 7.0 KB
Makefile -rw-r--r-- 1009 bytes
core.c -rw-r--r-- 19.1 KB
pwm-ab8500.c -rw-r--r-- 3.5 KB
pwm-atmel-tcb.c -rw-r--r-- 11.6 KB
pwm-atmel.c -rw-r--r-- 9.5 KB
pwm-bfin.c -rw-r--r-- 3.2 KB
pwm-ep93xx.c -rw-r--r-- 5.9 KB
pwm-imx.c -rw-r--r-- 7.5 KB
pwm-jz4740.c -rw-r--r-- 4.8 KB
pwm-lp3943.c -rw-r--r-- 7.5 KB
pwm-lpc32xx.c -rw-r--r-- 4.3 KB
pwm-mxs.c -rw-r--r-- 4.7 KB
pwm-pca9685.c -rw-r--r-- 7.1 KB
pwm-puv3.c -rw-r--r-- 3.5 KB
pwm-pxa.c -rw-r--r-- 5.5 KB
pwm-renesas-tpu.c -rw-r--r-- 12.5 KB
pwm-samsung.c -rw-r--r-- 15.9 KB
pwm-spear.c -rw-r--r-- 6.5 KB
pwm-tegra.c -rw-r--r-- 5.9 KB
pwm-tiecap.c -rw-r--r-- 8.8 KB
pwm-tiehrpwm.c -rw-r--r-- 16.3 KB
pwm-tipwmss.c -rw-r--r-- 3.4 KB
pwm-tipwmss.h -rw-r--r-- 1.1 KB
pwm-twl-led.c -rw-r--r-- 8.6 KB
pwm-twl.c -rw-r--r-- 9.1 KB
pwm-vt8500.c -rw-r--r-- 6.8 KB
sysfs.c -rw-r--r-- 7.7 KB

back to top