summaryrefslogtreecommitdiffstats
path: root/mm/mmzone.c
diff options
context:
space:
mode:
authorJavi Merino <javi.merino@arm.com>2015-08-17 20:21:42 +0200
committerEduardo Valentin <edubezval@gmail.com>2015-09-14 05:33:17 +0200
commit459ac37506d195713b5e82271a2ac44a777e47df (patch)
tree7a3071c20fcaa2b5d11b452b1969359ac722b5e6 /mm/mmzone.c
parentthermal: db8500_cpufreq_cooling: Fix module autoload for OF platform driver (diff)
downloadlinux-459ac37506d195713b5e82271a2ac44a777e47df.tar.xz
linux-459ac37506d195713b5e82271a2ac44a777e47df.zip
thermal: cpu_cooling: don't call kcalloc() under rcu_read_lock
build_dyn_power_table() allocates the power table while holding rcu_read_lock. kcalloc using GFP_KERNEL may sleep, so it can't be called in an RCU read-side path. Move the rcu protection to the part of the function that really needs it: the part that handles the dev_pm_opp pointer received from dev_pm_opp_find_freq_ceil(). In the unlikely case that there is an OPP added to the cpu while this function is running, return -EAGAIN. Fixes: c36cf0717631 ("thermal: cpu_cooling: implement the power cooling device API") Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Javi Merino <javi.merino@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'mm/mmzone.c')
0 files changed, 0 insertions, 0 deletions