Messages in this thread | | | Date | Thu, 12 May 2022 11:26:20 +0530 | From | Viresh Kumar <> | Subject | Re: [PATCH v3] cpufreq: fix race on cpufreq online |
| |
On 11-05-22, 14:59, Rafael J. Wysocki wrote: > There are two things. > > One is the possible race with respect to the sysfs access occurring > during failing initialization and the other is that ->offline() or > ->exit() can be called with or without holding the policy rwsem > depending on the code path. > > Namely, cpufreq_offline() calls them under the policy rwsem, but > cpufreq_remove_dev() calls ->exit() outside the rwsem. Also they are > called outside the rwsem in cpufreq_online().
Right.
> Moreover, ->offline() and ->exit() cannot expect policy->cpus to be > populated, because they are called when it is empty from > cpufreq_offline().
Correct.
> So the $subject patch is correct AFAICS even though it doesn't address > all of the above.
-- viresh
| |