diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-10-04 22:19:21 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-10-22 13:07:08 +0300 |
commit | cdf771ab476bd9acb0948f3088a277d5c3cacc6b (patch) | |
tree | cb6d911ad24da532226eb643d60c38637f08f4e9 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 7837fa8115e0273d3cfbd3d17b3f7b7291ceac08 (diff) | |
download | linux-cdf771ab476bd9acb0948f3088a277d5c3cacc6b.tar.xz |
thermal: core: Fix race between zone registration and system suspend
If the registration of a thermal zone takes place at the time when
system suspend is started, thermal_pm_notify() can run before the new
thermal zone is added to thermal_tz_list and its "suspended" flag will
not be set. Consequently, if __thermal_zone_device_update() is called
for that thermal zone, it will not return early as expected which may
cause some destructive interference with the system suspend or resume
flow to occur.
To avoid that, make thermal_zone_init_complete() introduced previously
set the "suspended" flag for new thermal zones if it runs during system
suspend or resume.
Fixes: 4e814173a8c4 ("thermal: core: Fix thermal zone suspend-resume synchronization")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/8490245.NyiUUSuA9g@rjwysocki.net
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions