Skip to content

usb: typec: qcom-pmic-typec: fix late probe and debounce teardown

Dickson Wu b4-sent linux-usb stable 1 version Applied

Status from this message: Queued the series for 6.6, thanks.

Get series with b4
b4 am [email protected] change-id 20261127-typec-66b-370b700f7dce

Versions newest first

  1. v1 Latest3 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3usb: typec: qcom-pmic: fix use-after-free on late probe errorsdrivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c+6 -20 replies
2/3usb: typec: qcom-pmic-typec: disable cc_debounce_dwork on stopdrivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c+17 -00 replies
3/3usb: typec: qcom-pmic-typec: drain cc_debounce_dwork if port_start() failsdrivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c+3 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchDmitry BaryshkovBryan O'DonoghueHeikki Krogerus
1/3R-b R-b R-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 6.6.y 0/3] usb: typec: qcom-pmic-typec: fix late probe and debounce teardown

Patch 1 unwinds port startup and TCPM registration on late probe errors. Patch 2 blocks new CC debounce work and drains pending work on port stop. Patch 3 does the same if port startup fails before the IRQs are enabled. The two debounce fixes failed to apply to 6.6 in <2026090807-unbalance-starlet-1c55@gregkh> and <2026090836-sublet-submersed-cfc4@gregkh>.

The late-probe patch uses a newer driver layout. On 6.6 the unwind calls the port helpers directly and keeps fwnode_handle_put(). This branch lacks disable_delayed_work_sync(), so port stop and port-start failure block new debounce work under the port lock and cancel pending work synchronously.

Tested on v6.6.163:
- The three patches applied cleanly with git am.
- Base and patched x86_64 allmodconfig W=1 builds passed for qcom_pmic_typec.o and qcom_pmic_typec_port.o with identical diagnostics.
- The patched x86_64 kernel booted under QEMU/KVM with CONFIG_TYPEC_QCOM_PMIC=y and powered down normally.
The guest has no Qualcomm PMIC, so the error and teardown paths were checked in source only.

The backport and the test runs were prepared with AI coding tools (OpenAI Codex agents, with review by Claude). I went over the result before signing off.

---
Fan Wu (2):
usb: typec: qcom-pmic-typec: disable cc_debounce_dwork on stop
usb: typec: qcom-pmic-typec: drain cc_debounce_dwork if port_start() fails

Johan Hovold (1):
usb: typec: qcom-pmic: fix use-after-free on late probe errors

 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c      |  8 ++++++--
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 20 ++++++++++++++++++++
 2 files changed, 26 insertions(+), 2 deletions(-)

---
base-commit: e2bb30811e063ce0db964484357973b855b06572
change-id: 20261127-typec-66b-370b700f7dce

Best regards,

Signature · 1 line
Dickson Wu <[email protected]>