“1fe82e2e148697fd1fbbb2944e143b182c51e227”上不存在“drivers/dma-buf/sync_debug.c”
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: 37713a1e ("thermal: imx: implement thermal alarm interrupt handling") Cc: <stable@vger.kernel.org> Signed-off-by: NMikhail Lappo <mikhail.lappo@esrlabs.com> Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Reviewed-by: NPhilipp Zabel <p.zabel@pengutronix.de> Acked-by: NDong Aisheng <aisheng.dong@nxp.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
Showing
想要评论请 注册 或 登录