[PATCH 0/2] thermal/drivers/qcom/tsens: Drop __init from the ->init callbacks
From: Christian Schmidbauer
Date: Wed Nov 04 2026 - 10:02:05 EST
Every function that tsens_probe() calls through priv->ops->init() is
marked __init, so a probe after free_initmem() jumps into freed memory.
On IPQ8064 with CONFIG_IPQ_LCC_806X disabled, fw_devlink defers the
probe of gcc and its tsens child until the deferred probe timeout,
which expires after init memory is freed. On an Aruba AP-325 the probe
then crashes in init_common(). With CONFIG_QCOM_TSENS=m the driver has
the same problem once the module's init function has returned.
Patch 1 drops __init from init_common() in a one-line change that
applies to every stable tree. Patch 2 drops it from the eight per-SoC
callbacks.
Patch 1 was tested on an Aruba AP-325 on a v7.2-rc7 based tree.
Not tested:
- Patch 2 on hardware. None of msm8226, msm8909, msm8939, msm8952,
msm8956, mdm9607, ipq5018, ipq5332 or ipq5424 was available, so patch
2 is only compile-tested.
- CONFIG_QCOM_TSENS=m on hardware.
Christian Schmidbauer (2):
thermal/drivers/qcom/tsens: Drop __init from init_common()
thermal/drivers/qcom/tsens: Drop __init from the per-SoC ->init
callbacks
drivers/thermal/qcom/tsens-v0_1.c | 9 +++++----
drivers/thermal/qcom/tsens-v1.c | 7 ++++---
drivers/thermal/qcom/tsens-v2.c | 2 +-
drivers/thermal/qcom/tsens.c | 2 +-
4 files changed, 11 insertions(+), 9 deletions(-)
base-commit: 2dc1f296b5754dd2441fc8b6613a362a47f6b98f
--
2.54.0