Re: [PATCH V2 1/2] cpufreq: unlock correct rwsem while updating policy->cpu

2013-09-17 Thread Jon Medhurst (Tixy)
On Tue, 2013-09-17 at 10:22 +0530, Viresh Kumar wrote: > Current code looks like this: > > WARN_ON(lock_policy_rwsem_write(cpu)); > update_policy_cpu(policy, new_cpu); > unlock_policy_rwsem_write(cpu); > > {lock|unlock}_policy_rwsem_write(cpu) takes/releases policy->cpu's

[PATCH V2 1/2] cpufreq: unlock correct rwsem while updating policy->cpu

2013-09-16 Thread Viresh Kumar
Current code looks like this: WARN_ON(lock_policy_rwsem_write(cpu)); update_policy_cpu(policy, new_cpu); unlock_policy_rwsem_write(cpu); {lock|unlock}_policy_rwsem_write(cpu) takes/releases policy->cpu's rwsem. Because cpu is changing with the call to update_policy_cpu(),