diff mbox

thermal: qcom: tsens: fix crash due to incorrect __init

Message ID 20170630204023.31712-1-robdclark@gmail.com (mailing list archive)
State Not Applicable, archived
Delegated to: Andy Gross
Headers show

Commit Message

Rob Clark June 30, 2017, 8:40 p.m. UTC
init_common() is called from probe, which can happen after the __init
section is already unloaded in the case of -EPROBE_DEFER.  Causing a
later probe to attempt to branch to hyperspace.

Cc: <stable@vger.kernel.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 drivers/thermal/qcom/tsens-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bjorn Andersson June 30, 2017, 9:22 p.m. UTC | #1
On Fri 30 Jun 13:40 PDT 2017, Rob Clark wrote:

> init_common() is called from probe, which can happen after the __init
> section is already unloaded in the case of -EPROBE_DEFER.  Causing a
> later probe to attempt to branch to hyperspace.
> 
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Rob Clark <robdclark@gmail.com>

Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/thermal/qcom/tsens-common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c
> index b1449ad..22ad37c 100644
> --- a/drivers/thermal/qcom/tsens-common.c
> +++ b/drivers/thermal/qcom/tsens-common.c
> @@ -123,7 +123,7 @@ static const struct regmap_config tsens_config = {
>  	.reg_stride	= 4,
>  };
>  
> -int __init init_common(struct tsens_device *tmdev)
> +int init_common(struct tsens_device *tmdev)
>  {
>  	void __iomem *base;
>  
> -- 
> 2.9.4
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rajendra Nayak July 14, 2017, 3:46 a.m. UTC | #2
On 07/01/2017 02:10 AM, Rob Clark wrote:
> init_common() is called from probe, which can happen after the __init
> section is already unloaded in the case of -EPROBE_DEFER.  Causing a
> later probe to attempt to branch to hyperspace.
> 
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Rob Clark <robdclark@gmail.com>

Sorry, seem to have missed looking at this patch,

Acked-by: Rajendra Nayak <rnayak@codeaurora.org>

Rob, in case you plan to resend this with the Acks,
can you please copy Eduardo Valentin <edubezval@gmail.com>
he would be the one to pick this one up.

> ---
>  drivers/thermal/qcom/tsens-common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c
> index b1449ad..22ad37c 100644
> --- a/drivers/thermal/qcom/tsens-common.c
> +++ b/drivers/thermal/qcom/tsens-common.c
> @@ -123,7 +123,7 @@ static const struct regmap_config tsens_config = {
>  	.reg_stride	= 4,
>  };
>  
> -int __init init_common(struct tsens_device *tmdev)
> +int init_common(struct tsens_device *tmdev)
>  {
>  	void __iomem *base;
>  
>
diff mbox

Patch

diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c
index b1449ad..22ad37c 100644
--- a/drivers/thermal/qcom/tsens-common.c
+++ b/drivers/thermal/qcom/tsens-common.c
@@ -123,7 +123,7 @@  static const struct regmap_config tsens_config = {
 	.reg_stride	= 4,
 };
 
-int __init init_common(struct tsens_device *tmdev)
+int init_common(struct tsens_device *tmdev)
 {
 	void __iomem *base;