diff options
| author | Loic Poulain <loic.poulain@oss.qualcomm.com> | 2026-07-22 15:45:19 +0200 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-08-07 11:44:09 +0530 |
| commit | 142c5593379273264474f31d5956b1a0065cd576 (patch) | |
| tree | ac6afa46b1cdcfc08cfb23a400dfbb9ff0a812ad /tools/perf/scripts/python | |
| parent | c271a6926ea7d3c9566b033d63fd4e8c488dc860 (diff) | |
phy: qcom: qmp-usb: 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")
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Link: https://patch.msgid.link/20260722-qcom-usb-phy-fix-null-v6-6-534f7e61b9a6@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
