From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796469340; b=dbeJaaEtXQyQVDJaoY7Ov2l7KkN8Vxjg1GqJ1k+LqJ1WDBKpDyTGKuXJDAPmKwmA4RCG FJYX6IPlR0Hm+EEFTfKK3416J56CuhzCeEYmy+CB396QKME2unIzEpt9kJl1kO5e8xiN3 hFB6Aw4OIlI3lhsJt0zNetzz7bAZgNdR1NIQIyye7ti74Veb9gs8zEcfXhtV9HstQDq9e sXJY3CbLiYKeSBLTWBg5lN4MHTH+zwxs2RvxE2pV2dtSHYY5qf0kdsvJIe7vsqQsuHDxq MjXPBRdfkKz1QkCFtdEt1H7tFOwkxNrlzl0z/crQ4tzwtnFo1jlHhcHOlYt0qrRs/ug== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796469340; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=G7wmzluBjjIAgFA7adH29oWcixp++7uW0COBow3YcmI=; b=ug40Tefle9S36lrYUOfEmzotmGwNWgJyppkzsVxjE463dfayJ9OJmSaS2IvUjOQXHgRm 8CAxT/wi17fSi2ZUVyO2XS21EVUwC2sLVHu7S5v1gg8vb2deAcm8ljf1MX3ZraRw1zLrN 5Z770s7B8oP/fZ1jZpfGnl5kW2wsfZHSuBOHgvGnMQoe2pe1BZE4GeQQ694gFVZlCFRcH kCA7ZnIlqgucTHdkY2/DErkxIHr7U4cF9EFDaemYvgmbgkj/uPwvu6DGsPGFjt1rfGSu+ XrZzNa9ud4qliDvBZVVcYihlAMS/WqC+O8vL3SCDiwegxrShWdu4JIret04NkOrOvKg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=KL3GqHDJ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50B6E606A322 for ; Sat, 5 Dec 2026 11:15:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=KL3GqHDJ Received: by smtp.kernel.org (Postfix) with ESMTPSA id D590B1F0092B; Sat, 5 Dec 2026 11:15:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796469339; bh=G7wmzluBjjIAgFA7adH29oWcixp++7uW0COBow3YcmI=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=KL3GqHDJeRH5qaX9vulFi0QxhC02HXegIHvvDSNniOnxz3btBa9uss9lZvdrm0JCY 1RhBUdeaXxc0ULuMOX8OkK1wlH8XPs9utGa7pTV0BA7pnQw+WOZPeQSL7TlJpMmIe4 dfOGMtX3LbVqYblmsCeablDUZfOvOSPol2fZLnoURqdu6LFTVu+KOH8CbBjlE3q/sZ 8UCnbqoL0iM4uPbFmggVdkoOpvx7uQ3lsC5s/1PfBEL1D4cagF09MCsy8/St6GjMhq 7SOWkwuyMKkIAzWdEiuei2iZrHx1xwTj0iHXcpnFA0Lx9yKY6zwwfnURabKvmVkeZ4 qNQmjJZn1ZyBw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] usb: typec: ucsi: Reset connector state in ucsi_unregister() Reply-To: sashiko-reviews@lists.linux.dev To: "Zhendong Liu" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261205-upstream3-ucsi-unregister-reset-v1-1-201f7b2f4107@gmail.com> References: <20261205-upstream3-ucsi-unregister-reset-v1-1-201f7b2f4107@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 11:15:39 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > From: Zhendong Liu >=20 > 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. >=20 > 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: >=20 > - 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 > Reported-by: Sashiko > 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 Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205-upstream3-= ucsi-unregister-reset-v1-1-201f7b2f4107@gmail.com?part=3D1