msm-core: Move get_user out side critical section

get_user is not needed inside critical section. Move
it outside to avoid kernel crash due to sleeping
function called from invalid context.

Change-Id: I29a54dca6620dc75356067ce6ff9a0931b4d0724
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
This commit is contained in:
Maulik Shah 2016-06-28 16:56:54 +05:30 committed by Kyle Yan
parent a6a26ac3c4
commit f600d8b9ec

View file

@ -428,8 +428,8 @@ static int update_userspace_power(struct sched_params __user *argp)
/* Copy the same power values for all the cpus in the cpumask /* Copy the same power values for all the cpus in the cpumask
* argp->cpumask within the cluster (argp->cluster) * argp->cpumask within the cluster (argp->cluster)
*/ */
spin_lock(&update_lock);
get_user(cpumask, &argp->cpumask); get_user(cpumask, &argp->cpumask);
spin_lock(&update_lock);
for (i = 0; i < MAX_CORES_PER_CLUSTER; i++, cpumask >>= 1) { for (i = 0; i < MAX_CORES_PER_CLUSTER; i++, cpumask >>= 1) {
if (!(cpumask & 0x01)) if (!(cpumask & 0x01))
continue; continue;