diff options
author | Krzysztof Kozlowski <[email protected]> | 2017-06-28 16:56:17 +0200 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2017-06-29 01:24:35 +0200 |
commit | 8b55e55ee44356d68f4a7ee4b11f9cbb1f5958cc (patch) | |
tree | a64beb938e255e47a048857c8b08329a63bd2783 /tools/perf/scripts/python/stat-cpi.py | |
parent | 10da65423fdbee185da5bb65f829a9d9312c1198 (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 <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Ulf Hansson <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions