thermal: qcom: tsens: fix crash due to incorrect __init
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
@@ -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
Quoted 6 lines · Rob Clark
init_common()is called from probe, which can happen after the__initsection is already unloaded in the case of -EPROBE_DEFER. Causing a later probe to attempt to branch to hyperspace.Cc <[email protected]>Signed-off-by Rob Clark <[email protected]>
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@@ -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
Quoted 6 lines · Rob Clark
init_common()is called from probe, which can happen after the__initsection is already unloaded in the case of -EPROBE_DEFER. Causing a later probe to attempt to branch to hyperspace.Cc <[email protected]>Signed-off-by Rob Clark <[email protected]>
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@@ -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