stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Fabio Estevam <festevam@gmail.com>, rui.zhang@intel.com
Cc: edubezval@gmail.com, mikhail.lappo@esrlabs.com,
	linux-pm@vger.kernel.org, linux-imx@nxp.com, shawnguo@kernel.org,
	stable@vger.kernel.org, Fabio Estevam <fabio.estevam@nxp.com>
Subject: Re: [PATCH] thermal: imx: Fix race condition in imx_thermal_probe()
Date: Tue, 27 Feb 2018 09:44:40 +0100	[thread overview]
Message-ID: <1519721080.3402.6.camel@pengutronix.de> (raw)
In-Reply-To: <1517595466-23465-1-git-send-email-festevam@gmail.com>

On Fri, 2018-02-02 at 16:17 -0200, Fabio Estevam wrote:
> From: Mikhail Lappo <mikhail.lappo@esrlabs.com>
> 
> 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: <stable@vger.kernel.org>
> Signed-off-by: Mikhail Lappo <mikhail.lappo@esrlabs.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

  parent reply	other threads:[~2018-02-27  8:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 18:17 [PATCH] thermal: imx: Fix race condition in imx_thermal_probe() Fabio Estevam
2018-02-14  3:23 ` Fabio Estevam
2018-02-26 18:56   ` Fabio Estevam
2018-02-28  4:42     ` Zhang Rui
2018-03-07 19:55       ` Fabio Estevam
2018-03-20 13:13         ` Fabio Estevam
2018-03-20 13:19           ` Zhang Rui
2018-02-27  8:44 ` Philipp Zabel [this message]
2018-02-28  2:16 ` A.s. Dong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519721080.3402.6.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=edubezval@gmail.com \
    --cc=fabio.estevam@nxp.com \
    --cc=festevam@gmail.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=mikhail.lappo@esrlabs.com \
    --cc=rui.zhang@intel.com \
    --cc=shawnguo@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).