summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2017-06-28 16:56:17 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-06-29 01:24:35 +0200
commit8b55e55ee44356d68f4a7ee4b11f9cbb1f5958cc (patch)
treea64beb938e255e47a048857c8b08329a63bd2783 /lib
parent10da65423fdbee185da5bb65f829a9d9312c1198 (diff)
PM / Domains: Handle safely genpd_syscore_switch() call on non-genpd device
genpd_syscore_switch() had two problems: 1. It silently assumed that device, it is being called for, belongs to generic power domain and used container_of() on its power domain pointer. Such assumption might not be true always. 2. It iterated over list of generic power domains without holding gpd_list_lock mutex thus list could have been modified at the same time. Usage of genpd_lookup_dev() solves both problems as it is safe a call for non-generic power domains and uses mutex when iterating. Reported-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions