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=1796182898; b=VxcEG+fJhNY3GJZ1aKJUATHcCLsGnbQ2a+dnDTcvOn4MCIK/NigNQd4H5ZtbULKCzhPW aqqPAI2IU7I1mSymajae4xwgANUAHHLXf5EuGrV6IrKSA8WC8yRMLNtkLGXMbaraKtES5 Qmz6b+bcDmEZhkHp1glyDfwNGl39PXgE1LXHzl84WyQUrbjNVn6hnl9ED7hUFjro1kXox cUGgJXO/Riy1QbO3TXL7X2yveHfwkEWRrNIpWbZE2GFsuBi+OVGrDdR6sdXFK7sbrzHKY HvaUXCYSHFhmyo8bE2Kt7dsBQZsf6YXb4n1uuAQUT21j16CfmQVvgW/dOwD2EcYYu7g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796182898; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=xato2ma579SijBq6t74ytKJESM0pEPBTt5Reqo+zIf8=; b=4YdF5x7YISVqNAirVKst0ETGyGbqDQLQvK74yU1/HbZRsrdPN4nt2auI5slBJupwSfeK avdcpdDPUJLcki3EG9ucW6Pr2tB0Epg2n50dD841ZjGx2avBEB42XPqdqYJo75G5G4ZYN +053bo2mJPghjdyDfHsHPwyK/DoMd1c7E8yKwLc+i0/bC3OiQpNJ52ScSmW6e/G6nqU7i 5k4DPAGCi4qr7e2PqexQJOBykA93Rrx4kUh+6v6csaTiZjl4cz0EoWeeAEA1PzGXdhnMZ WQCNWyDaD736tsa6X04A+2HdjzT7qjwTE0sXvHBQ5BooCPuGrDIjLcpW/bYv8h2T4fg== 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=bc8Z0IwA; 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 A23AA606A31A; Wed, 2 Dec 2026 03:41:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bc8Z0IwA Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED5541F000C1; Wed, 2 Dec 2026 03:41:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796182898; bh=xato2ma579SijBq6t74ytKJESM0pEPBTt5Reqo+zIf8=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=bc8Z0IwAF/PFhH0/8VKPUv09OIQ/FpACQek47c0Srlfj0i/TNqSOXjf1DmWSeXPN1 ooLcfprcyZzMVIdz/zbO8rTGclV99m2Rp3Omv+NMSsuLv5864vOqr9uZxjvd89itA0 /eipmoUMktZL6c31mNctPRC1AAyvZPLXruBOCb6cMvB5CzKd7ZVWj8N/ONsp6WbPy2 L3/r7214lAOfhH0PIK8DjDAw3lpxmR9gljEWh9aVlTf+zQ7fQzMFJ3QT9HeYuiyKmy uEyQTTbN5E4LajrzROsq3BLtB1MWhzNkea5CWmZLnXYyA8/8rH614o6HliUnKUK+/n 5bKucAE6E0KgA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 6/9] media: i2c: it6625: add I2S audio capture DAI Reply-To: sashiko-reviews@lists.linux.dev To: "Hermes Wu" Cc: devicetree@vger.kernel.org, linux-sound@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org, media-ci@linuxtv.org In-Reply-To: <20261202-upstream-it6625-alsa-i2s-v3-6-4747dd34b30c@ite.com.tw> References: <20261202-upstream-it6625-alsa-i2s-v3-0-4747dd34b30c@ite.com.tw> <20261202-upstream-it6625-alsa-i2s-v3-6-4747dd34b30c@ite.com.tw> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 03:41:33 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] media: i2c: it6625: work teardown after subdev cleanup in it6625_probe() -- commit a36675d9bf48d6df984c2c02be37d3a54770 Author: Hermes Wu media: i2c: it6625: add I2S audio capture DAI This commit registers an ASoC capture DAI for the IT6625/IT6626 I2S audio output and keeps the V4L2 audio controls updated from the sampled audio status. > diff --git a/drivers/media/i2c/it6625.c b/drivers/media/i2c/it6625.c > index 6ff5a5574b379..5cb8b15ea8f70 100644 > --- a/drivers/media/i2c/it6625.c > +++ b/drivers/media/i2c/it6625.c [ ... ] > @@ -2434,6 +3001,13 @@ static int it6625_probe(struct i2c_client *client) > goto err_clean_debugfs; > } > =20 > + /* may bind a waiting sound card, so everything must be set up */ > + err =3D it6625_audio_register(it6625); > + if (err) { > + v4l2_async_unregister_subdev(sd); > + goto err_clean_debugfs; > + } > + > if (client->irq) > enable_irq(client->irq); > else > @@ -2442,6 +3016,12 @@ static int it6625_probe(struct i2c_client *client) > return 0; > =20 > err_clean_debugfs: > + /* > + * Events dispatched by the probe control update or a debugfs reader > + * may have queued it. Disable rather than cancel it: a reader still > + * running until the debugfs removal below must not queue it again. > + */ > + disable_delayed_work_sync(&it6625->audio_refresh_work); > v4l2_debugfs_if_free(it6625->infoframes); > debugfs_remove_recursive(it6625->debugfs_dir); > cec_unregister_adapter(it6625->cec_adap); [Severity: Medium] Can polling_work or hpd_delayed_work run after cec_adap and it6625->hdl are torn down if it6625_audio_register() fails? Once v4l2_async_register_subdev() exposes the subdev, a bound bridge can invoke subdev ops such as it6625_isr() (queuing polling_work) or it6625_s_edid() (queuing hpd_delayed_work) before it6625_audio_register() fails and calls v4l2_async_unregister_subdev(). On the err_clean_debugfs path, cec_adap and the V4L2 controls are destroyed before err_clean_work_queues cancels those work items: CPU0 kworker it6625_probe() v4l2_async_register_subdev(sd) /* subdev callback: it6625_isr() */ schedule_work(&it6625->polling_work) it6625_audio_register() -> fails v4l2_async_unregister_subdev(sd) goto err_clean_debugfs ... v4l2_ctrl_handler_free(&it6625->hdl) it6625_polling_work() ... it6625_s_ctrl_detect_hdmi_5v() <-- use-after-free on ctrl err_clean_work_queues: cancel_work_sync(&it6625->polling_work) Canceling polling_work and hpd_delayed_work right after v4l2_async_unregister_subdev() (or before tearing down cec_adap, sd and hdl) would avoid this regression. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202-upstream-i= t6625-alsa-i2s-v3-0-4747dd34b30c@ite.com.tw?part=3D6