FAILED: patch "[PATCH] usb: typec: ucsi: Correct teardown ordering in ucsi_init()" failed to apply to 6.6-stable tree
Subsystems (3)
[email protected]
maintainerThe 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 <[email protected]>.
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 fb0bf289f5d529336ef490c8273e88a8a8b29f69
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026072733-rigor-skier-ea97@gregkh' --subject-prefix 'PATCH 6.6.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From fb0bf289f5d529336ef490c8273e88a8a8b29f69 Mon Sep 17 00:00:00 2001
From: Andrei Kuchynski <[email protected]>
Date: Fri, 17 Jul 2026 10:46:14 +0000
Subject: [PATCH] usb: typec: ucsi: Correct teardown ordering in ucsi_init()
error path
The commit 7aa7d4bf9d3f ("usb: typec: ucsi: Fix race condition and ordering in port unregistration") consolidated port teardown into the ucsi_unregister_port() helper. However, it introduced an ordering problem in the ucsi_init() error path.
Fix this by ensuring ucsi_unregister_port() is called before we unregister their corresponding lockdep keys.
drivers/usb/typec/ucsi/ucsi.c +2 -2
@@ -2142,11 +2142,11 @@ static int ucsi_init(struct ucsi *ucsi)return 0 ; err_unregister: +for (con = connector; con->port; con++) +ucsi_unregister_port (con);for (i =0 ; i < ucsi->cap.num_connectors; i++)lockdep_unregister_key (&connector[i].lock_key); -for (con = connector; con->port; con++) -ucsi_unregister_port (con);kfree (connector); err_reset:memset (&ucsi->cap,0 ,sizeof (ucsi->cap));