summaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2022-07-07 12:58:31 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-07-15 20:19:51 +0300
commita2f6a7ac60e234810a386aaa6aad106927c39c4f (patch)
tree1d6d450f33694fa6ec0fca2a4f0e5df13aaf1574 /lib/memory-notifier-error-inject.c
parentca62229162a905b13f02e081767bf126f230ecc9 (diff)
downloadlinux-a2f6a7ac60e234810a386aaa6aad106927c39c4f.tar.xz
cpufreq: Warn users while freeing active policy
With the new design in place, the show() and store() callbacks check if the policy is active or not before proceeding any further to avoid potential races. And in order to guarantee that cpufreq_policy_free() must be called after clearing the policy->cpus mask, i.e. by marking the policy inactive. In order to avoid introducing a bug around this later, print a warning message if we end up freeing an active policy. Also update cpufreq_online() a bit to make sure we clear the cpus mask for each error case before calling cpufreq_policy_free(). Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions