Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Zhendong Liu" <yzddmr6@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: typec: ucsi: Reset connector state in ucsi_unregister()
Date: Sat, 05 Dec 2026 11:15:39 +0000	[thread overview]
Message-ID: <sashiko-outbox-251456@kernel.org> (raw)
In-Reply-To: <20261205-upstream3-ucsi-unregister-reset-v1-1-201f7b2f4107@gmail.com>

> From: Zhendong Liu <yzddmr6@gmail.com>
> 
> ucsi_unregister() frees the connector array but leaves ucsi->connector
> pointing at it and ucsi->ntfy as ucsi_init() set it. When it cancels a
> connector change work that has not run yet, it also leaves EVENT_PENDING
> set, as only the work acknowledges the change and clears it.
> 
> That state outlives the registration. Three drivers unregister and then
> register the same struct ucsi again: ucsi_glink when the remote
> processor restarts, ucsi_ccg after flashing new firmware, and
> ucsi_stm32g0 after a firmware update. The new registration then starts
> with:
> 
> - A dangling ucsi->connector. If ucsi_init() fails before it publishes
>   a new array, for example because the PPM does not come back from the
> [ ... ]
> Cc: stable <stable@kernel.org>
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/all/sashiko-outbox-239672@kernel.org/
> Closes: https://lore.kernel.org/all/sashiko-outbox-248918@kernel.org/
> Signed-off-by: Zhendong Liu <yzddmr6@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261205-upstream3-ucsi-unregister-reset-v1-1-201f7b2f4107@gmail.com?part=1

      reply	other threads:[~2026-12-05 11:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05 10:55 [PATCH] usb: typec: ucsi: Reset connector state in ucsi_unregister() Zhendong Liu via B4 Relay
2026-12-05 11:15 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-251456@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=yzddmr6@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox