Linux kernel -stable discussions
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] usb: typec: qcom-pmic-typec: disable cc_debounce_dwork on" failed to apply to 6.6-stable tree
@ 2026-09-08 12:30 gregkh
  2026-11-27 20:47 ` [PATCH 6.6.y 0/3] usb: typec: qcom-pmic-typec: fix late probe and debounce teardown Dickson Wu via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: gregkh @ 2026-09-08 12:30 UTC (permalink / raw)
  To: fanwu01, gregkh, heikki.krogerus, stable; +Cc: stable


The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 263f7d61a4201cde16849b2d016251806e7418be
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026090807-unbalance-starlet-1c55@gregkh' --subject-prefix 'PATCH 6.6.y' 'HEAD^..'

Possible dependencies:



thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 263f7d61a4201cde16849b2d016251806e7418be Mon Sep 17 00:00:00 2001
From: Fan Wu <fanwu01@zju.edu.cn>
Date: Thu, 20 Aug 2026 13:53:06 +0000
Subject: [PATCH] usb: typec: qcom-pmic-typec: disable cc_debounce_dwork on
 stop

cc_debounce_dwork is queued from the set_cc() and start_toggling()
callbacks, which run from TCPM's kthread worker.  port_stop() returns
before tcpm_unregister_port() destroys that worker.  Flushing the worker
during unregister may therefore run a callback which queues the delayed
work after port_stop() has returned.

The delayed work can then run after devres has freed pmic_typec_port.

Use disable_delayed_work_sync() in port_stop() to cancel a pending
instance and prevent the TCPM callbacks from queueing another one.

This issue was found by an in-house static analysis tool.

Fixes: a4422ff22142 ("usb: typec: qcom: Add Qualcomm PMIC Type-C driver")
Cc: stable <stable@kernel.org>  # v6.10+
Assisted-by: Codex:gpt-5.6
Signed-off-by: Fan Wu <fanwu01@zju.edu.cn>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260820135307.153773-2-fanwu01@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
index bf985efe1cd6..d43799f43184 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
@@ -693,6 +693,8 @@ static void qcom_pmic_typec_port_stop(struct pmic_typec *tcpm)
 
 	for (i = 0; i < pmic_typec_port->nr_irqs; i++)
 		disable_irq(pmic_typec_port->irq_data[i].irq);
+
+	disable_delayed_work_sync(&pmic_typec_port->cc_debounce_dwork);
 }
 
 int qcom_pmic_typec_port_probe(struct platform_device *pdev,


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-29 19:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08 12:30 FAILED: patch "[PATCH] usb: typec: qcom-pmic-typec: disable cc_debounce_dwork on" failed to apply to 6.6-stable tree gregkh
2026-11-27 20:47 ` [PATCH 6.6.y 0/3] usb: typec: qcom-pmic-typec: fix late probe and debounce teardown Dickson Wu via B4 Relay
2026-11-29 18:59   ` Sasha Levin
2026-11-27 20:47 ` [PATCH 6.6.y 1/3] usb: typec: qcom-pmic: fix use-after-free on late probe errors Dickson Wu via B4 Relay
2026-11-27 20:47 ` [PATCH 6.6.y 2/3] usb: typec: qcom-pmic-typec: disable cc_debounce_dwork on stop Dickson Wu via B4 Relay
2026-11-27 20:47 ` [PATCH 6.6.y 3/3] usb: typec: qcom-pmic-typec: drain cc_debounce_dwork if port_start() fails Dickson Wu via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox