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=1793838603; b=qF8hyGDfRR4aADnoY++jVm+uauWmSs90lu4q7M6RPjk/JWxj/ptWlek2HJ3XvciW6vxs 69B+Ru3jQcFo9Wt2mkmlJCIyGWR7KIQrVSR1VgFpE/q7xv2Ms4whJvDZ9GAU/SlbLAizk af3ysunpOujuInR+lyEjGBCvpqUEXYikUHohawam9elb6/4FUArDR+Hfml5xC3dzrYG+o M8gy3/jIiGKgt+Fh9JD6x6rkhz1u6hfQPN1j0Oia2scLdIwD9BrfYjPvZwMGr4iyBSeI2 tVuC/o33PgJbnjwVSROhk7P0q5ifrnOQ28d6rOiEvQsqLXqpCePGYyndhtYJqjl5DEw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793838603; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=VRFy9poBSwww67kZBPrPXeaGbW8hiDHqyHD5zl5lBZk=; b=GIERmkZJOqKPDIEO9wKDtpEXwMVMe70x2cGftQJohCGJrXnWT7XM0P+gvaTkygRnksaF 1PtQDpdtEGsvkLzlUedM3JqYQgWvJbUbutxKZfcGkNKLqLunmtCTyo+mCDt21cSNaCUn2 C1Op+IpLsofcvRMjhrMGu7BLD7nhK8BUC7FWnSj7iazIIBcrWabIUttgDJcTBliUhzTvr 85a2FW2k+Dm6dIGa2e7q3lc8N+aRaD3ZHq8KX+3nK6HwiUyDnrbdYrW9lt8ncTN1Z+O/3 AC4CrhiyV2skESqq4ctXTasq/QkX1E32myT08K5BDV/jcpnHF4wsHTV+RN0mbdOrmag== 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=krcL7iTp; 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 B6586606A31B for ; Thu, 5 Nov 2026 00:30:02 +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=krcL7iTp Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B2941F000C1; Thu, 5 Nov 2026 00:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793838602; bh=VRFy9poBSwww67kZBPrPXeaGbW8hiDHqyHD5zl5lBZk=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=krcL7iTput23XqYULI09Bpk5X0xpOT7/vGrrfb0Cc/JuKcCODkTlKqGXO1aD5Caru FV66IA8s6q1QvC0ZjzpvTfrVZ4GU8jM+xK0T6OuxCrsn3bnHf9CUsY/WsiD1YCk4Uv phov+wPROspau6q/FOIjkvFQ2KzrLRSTfsyy663YzLw115fUDQM8Ba1bkGSTag5Ykr 60IqHLsBuBB5lYlU0B0OmwoDiuOTATnsMF61hXnuPMHjDaJoA6XCSQQt7/yxSd3fwt DwXi4aMu9GmaSDm/DPvptASUIK4ND4MvIVIzQvTjTTPRejv9DCD0bRO1QM1uItPMgP RXagPoLizBiKg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v15 06/12] ALSA: virtio: Retain queued messages through device reset Reply-To: sashiko-reviews@lists.linux.dev To: "Joonho Lee" Cc: virtualization@lists.linux.dev, "Michael S. Tsirkin" , "Eugenio Perez" In-Reply-To: <20261105000915.15177-7-mynameisjune111@gmail.com> References: <20261105000915.15177-1-mynameisjune111@gmail.com> <20261105000915.15177-7-mynameisjune111@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 05 Nov 2026 00:30:01 +0000 X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > Keep the control queue available through snd_card_free() so close-time > STOP and RELEASE commands can still be submitted. Block new control > requests and mark pending messages canceled before reset, then release > their queue references only after reset and queue deletion. >=20 > For PCM queues, detach each remaining virtqueue buffer after the device > has stopped DMA and retire its message without reporting a normal > completion. Detach all queues before deleting them so outstanding DMA > mappings are unmapped and no token remains for a late device completion. >=20 > Clear each queue wrapper inside the same critical section that detaches > its buffers. Check the callback's queue identity under the wrapper lock > for PCM, control and event queues. This makes queue retirement explicit > through teardown and restore. A forced callback test passed on both > versions; the proposed detached-ring IRQ failure was not reproduced on > the tested PCI transport. >=20 > Protect event callback admission with the event queue lock. Disabling > events waits for an active dispatch, and later callbacks see a closed > gate before ALSA objects are freed. Enable and pending-event draining > share the same lock. >=20 > Reclaim pending event buffers after a failed probe without dispatching > notifications into ALSA objects that have not been constructed. Record > the queue's prior enabled state under its lock before closing admission. >=20 > Fixes: 9d45e514da88 ("ALSA: virtio: handling control messages") > Assisted-by: LLM > Signed-off-by: Joonho Lee Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261105000915.1517= 7-1-mynameisjune111@gmail.com?part=3D6