diff options
author | Mikhail Lappo <[email protected]> | 2018-02-02 16:17:46 -0200 |
---|---|---|
committer | Zhang Rui <[email protected]> | 2018-03-14 15:14:40 +0800 |
commit | cf1ba1d73a33944d8c1a75370a35434bf146b8a7 (patch) | |
tree | 5d893a5865b7b4a83bed362426c014c9a08a7427 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 0c8efd610b58cb23cefdfa12015799079aef94ae (diff) |
thermal: imx: Fix race condition in imx_thermal_probe()
When device boots with T > T_trip_1 and requests interrupt,
the race condition takes place. The interrupt comes before
THERMAL_DEVICE_ENABLED is set. This leads to an attempt to
reading sensor value from irq and disabling the sensor, based on
the data->mode field, which expected to be THERMAL_DEVICE_ENABLED,
but still stays as THERMAL_DEVICE_DISABLED. Afher this issue
sensor is never re-enabled, as the driver state is wrong.
Fix this problem by setting the 'data' members prior to
requesting the interrupts.
Fixes: 37713a1e8e4c ("thermal: imx: implement thermal alarm interrupt handling")
Cc: <[email protected]>
Signed-off-by: Mikhail Lappo <[email protected]>
Signed-off-by: Fabio Estevam <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Acked-by: Dong Aisheng <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions