diff options
| author | Loic Poulain <loic.poulain@oss.qualcomm.com> | 2026-07-22 15:45:16 +0200 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-08-07 11:44:09 +0530 |
| commit | 8e3687f7e18fe84372e86875709d56c37e7525a8 (patch) | |
| tree | 5d232c0bd9e9933a2afb3918b5e4ade44cda5e9d /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 991339420f6ddd299d9f34316866dda83dccd72a (diff) | |
phy: qcom: qmp-usb-legacy: Fix possible NULL-deref on early runtime suspend
There is a small window where the runtime suspend callback may run
after pm_runtime_enable() and before pm_runtime_forbid(). In this
case, a crash occurs because runtime suspend/resume dereferences
qmp->phy pointer, which is not yet initialized:
`if (!qmp->phy->init_count) {`
This can also happen if user re-enables runtime-pm via the sysfs
attribute before qmp phy is initialized.
Similarly to other qcom phy drivers, introduce a qmp->phy_initialized
variable that can be used to avoid relying on the possibly uninitialized
phy pointer.
Fixes: e464a3180a43 ("phy: qcom-qmp-usb: split off the legacy USB+dp_com support")
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Link: https://patch.msgid.link/20260722-qcom-usb-phy-fix-null-v6-3-534f7e61b9a6@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
