Re: [RFC PATCH 16/19] cpufreq: hold policy->rwsem across CPUFREQ_GOV_POLICY_EXIT

From: Viresh Kumar
Date: Tue Jan 12 2016 - 06:10:11 EST

On 11-01-16, 17:35, Juri Lelli wrote:
> There are no good reasons why policy->rwsem cannot be hold across calls to
> __cpufreq_governor with CPUFREQ_GOV_POLICY_EXIT event.
> Remove {up,down}_write across such call sites. This also verify assertion
> that policy->rwsem is always hold when calling into __cpufreq_governor.

Test on X86 with prove_locking etc enabled.. and try running tests
from my cpufreq-test repo. There were real concerns. Over that, I have
identified the issue completely, as to why the ABBA dependency I
mentioned earlier is there. You can find that in the branch I shared
with you earlier.

commit 57714d5b1778 ("cpufreq: Access governor's sysfs attributes without 'policy->rwsem'")