Skip to contentSkip to conversation

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

PATCH In review Rob Clark 3 participants 3 messages Jun 30, 2017 – Jul 14, 2017

Subsystems (4)
lore
Share & tools
lore

Rob Clark

author
#0 lore raw

PATCH 1/1 thermal: qcom: tsens: fix crash due to incorrect __init

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.

---
 drivers/thermal/qcom/tsens-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/qcom/tsens-common.c +1 -1
index b1449ad..22ad37c 100644
@@ -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;
 
Signature · 1 line
2.9.4
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Rob Clark

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.

Regards,
Bjorn

Quoted 20 lines
---
 drivers/thermal/qcom/tsens-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/qcom/tsens-common.c +1 -1
index b1449ad..22ad37c 100644
@@ -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;
 
Signature · 1 line
2.9.4
Acked-by on v1 1/1
#2 lore raw
In reply to Rob Clark
Quoted 6 lines · Rob Clark

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.

Sorry, seem to have missed looking at this patch,

Rob, in case you plan to resend this with the Acks, can you please copy Eduardo Valentin <[email protected]> he would be the one to pick this one up.

Quoted 18 lines
---
 drivers/thermal/qcom/tsens-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/qcom/tsens-common.c +1 -1
index b1449ad..22ad37c 100644
@@ -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;
 
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation