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=1796181333; b=Hq/ludC4IklPP8ZCQa66v1Ml7IwSJiTNFiY/1xTngS0UCzWCa3jAJFXMYZchuh+DLYfm DxRkQ61Q5k0UrW90q1g7v74DR06T9bZH00BFgp8amAm5kibeL7zI1ZWqLC/TB8Pvqrala kuBnIOwTsVlOCXP8G4EPZuoR2rmNkfaIkfqp43B/R1Sm6fiSO1gzD8Ny01piN9hRSUZ3Z EsQNhNokFprbFVvd3laRk+b8TwWOMIqyZKpqT7UjqrpH8hBgCepS+8eMMJy2+TqfSvOJd fDEB3aCXv36kdgOhRD/ukTvAXvj30ECULWYNJs88FYD4Y942zUwVKgLGmT8QWn+lWsQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796181333; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=dUPQ1jUStHavIiv3tC+rq93By0RI5J0pmTRsl6v5UBc=; b=h28eQJqRKRo42r4PfXmIlRK+CI640ubCWbOBCmxqFM9xSOUDwxjk8cl8gxpalfoVnWlF N3g39xOofht+YPesptzI+w0AiTANHeUjYGv/IOesrWBGAmDShgh8Cu/sJFG7O2Qi8ZcCl BsC7UjMy+pvsEDXqnzS1JuIOfqgrtffew509LKeXwqSxk16XIHpjt4OkZmPePnFApy3Fo vxU5rDKhr9rNgX1Lp0yyj9teDaIFzEvSwCE4e7rqYpZybDXcL8RFmVaBE1wGQDhFBGCZl VdvFaJ9oDciLzdUZ2CDyga8lXrWeWOzoQeFX1hUZjOkvB/hWHkNniA4wgPIR1DE6ibw== 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="HjX/nPCk"; 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 31E73606A322 for ; Wed, 2 Dec 2026 03:15:32 +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=HjX/nPCk Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8268B1F000C1; Wed, 2 Dec 2026 03:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796181332; bh=dUPQ1jUStHavIiv3tC+rq93By0RI5J0pmTRsl6v5UBc=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=HjX/nPCk49BbCsrommZiixt2Fc1vQiyAX4TO8nr8VPDOEEPPxnAh3UZ1vbNL5Ybvm qBdM+c4DNVSTZD9cj/NM6bDdH0POP/N/qBE21HBDoUjkXBHbm98YtjrPZW/aOh+lh7 pvxmfd/mH7iTeM/J+L8fNKvSyuRwbBy0KrVGa6BntbqUSRUsYmBxA65FjZzJRupsoM g3BeSupghYvyJAMcgATBdNGavdTxduOnbjiesAHKxxfIfE0i9XzNYO4hjQztAabVvB a+VsKNIOddlf7OqQf3STPDhSSno9yJD8mGwCvSWHyWuag/Xp6iNe95jFcdRAkV4VQE aVMBp+9l1FMSw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] ALSA: control: fix find_id()/find_numid() kerneldoc and lock the usb-mixer dedup loop Reply-To: sashiko-reviews@lists.linux.dev To: "Hanxiang Xu" Cc: linux-sound@vger.kernel.org In-Reply-To: <20261202103400.5-1-xuhx@hust.edu.cn> References: <20261202103400.5-1-xuhx@hust.edu.cn> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 03:15:32 +0000 X-Mailing-List: linux-sound@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: - [Low] ALSA: control: missing Fixes: trailer for commit 38ea4c3dc306 -- commit 212246520f3c27e817a4720afbc87e9cb78c2c9f Author: Hanxiang Xu > ALSA: control: fix find_id()/find_numid() kerneldoc and lock the usb-mixe= r dedup loop > > With CONFIG_SND_CTL_FAST_LOOKUP the fast paths of > snd_ctl_find_id()/snd_ctl_find_numid() are unlocked xa_load() calls > that return an unreferenced struct snd_kcontrol pointer, but their > kerneldoc still states "Note that this function takes > card->controls_rwlock lock internally". Since the removal path frees > the control without a grace period, a caller that relies on that > stale statement dereferences freed memory. > > The jack-creation (get_available_index()) and vmaster-follower > (snd_ctl_add_followers()) callers already hold the lock as of > 7.4-rc5. Fix the two kerneldoc blocks and lock the remaining > unlocked caller, the dedup loop of snd_usb_mixer_add_list() (the > read lock is released before snd_ctl_add() takes the write lock). > > Cc: > Signed-off-by: Hanxiang Xu [Severity: Low] Commit 38ea4c3dc306 ("ALSA: control: Optimize locking for look-up") dropped internal card->controls_rwsem locking from snd_ctl_find_id() and snd_ctl_find_numid() and updated their kerneldoc comments to mention card->controls_rwlock. Should this include: Fixes: 38ea4c3dc306 ("ALSA: control: Optimize locking for look-up") --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202103400.5-1-= xuhx@hust.edu.cn?part=3D1