summaryrefslogtreecommitdiff
path: root/tools/time
diff options
context:
space:
mode:
authorJavi Merino <javi.merino@arm.com>2015-08-17 18:21:42 (GMT)
committerEduardo Valentin <edubezval@gmail.com>2015-09-14 03:33:17 (GMT)
commit459ac37506d195713b5e82271a2ac44a777e47df (patch)
tree7a3071c20fcaa2b5d11b452b1969359ac722b5e6 /tools/time
parent0847e26a84faa0fcb4572d7e42d0a44cab69a83d (diff)
downloadlinux-459ac37506d195713b5e82271a2ac44a777e47df.tar.xz
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 'tools/time')
0 files changed, 0 insertions, 0 deletions