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.7 KB
Makefile -rw-r--r-- 832 bytes
b43_pci_bridge.c -rw-r--r-- 1.8 KB
driver_chipcommon.c -rw-r--r-- 17.8 KB
driver_chipcommon_pmu.c -rw-r--r-- 21.9 KB
driver_chipcommon_sflash.c -rw-r--r-- 4.1 KB
driver_extif.c -rw-r--r-- 5.0 KB
driver_gige.c -rw-r--r-- 7.3 KB
driver_gpio.c -rw-r--r-- 11.8 KB
driver_mipscore.c -rw-r--r-- 8.4 KB
driver_pcicore.c -rw-r--r-- 18.3 KB
embedded.c -rw-r--r-- 6.2 KB
main.c -rw-r--r-- 33.8 KB
pci.c -rw-r--r-- 34.4 KB
pcihost_wrapper.c -rw-r--r-- 2.7 KB
pcmcia.c -rw-r--r-- 19.3 KB
scan.c -rw-r--r-- 10.2 KB
sdio.c -rw-r--r-- 15.6 KB
sprom.c -rw-r--r-- 5.2 KB
ssb_private.h -rw-r--r-- 8.1 KB

back to top