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=1796333990; b=R8vJM2CXU91phqaTNWlX3cpxP+jBBtEGqw3q1d/tM7JPbwLaEZHX9kJ1OkFrs4s/Ge46 DTLjS9o29aOJg5E+ki24t5nDkye9YYZE6FjMmW0a5nsq6k35doA0m0O+92mqtkTJu6yrT f7QluG4zj3XQaju8t2awES2aKfXWK4Jw+7ikQxXXAmRu4fJ3N7g10N2T4oN/tYSMpLi+A 7L2k4mNtuJrVnG/vv1YH6qs5bRbcVGg/9T/bMhRvr6Nwj0fGonrkKj3vpaM+kaGYWiKh0 1Yqc2BDyunyHUcycHSG+vmw8R9G/dzClulKcLJ3ine1sg1m0ukgHiIQmDv6PkCyuG6g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796333990; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=16DXNNsrBP01S/GniP3JOZvaLhKXJp1FVFZDau81fRc=; b=Q6+noosIyVjoWVznPo/EIwrd0nbbmHe1vLaVDgAPcDmxDfYzybj+YceUzVMzsIy/Wa7/ GnJDe1fI1yWD/moZ7U9YF+IYRkL6RprWrymIL7LkjHG0w/84tLMZPUW59zon13Tod8Cu/ lFymU6dX1h/VjV9gcgbvw1utkv3MnFnQTt7AbYZ5VzcBWqwd44l9whJjWWLH98Ybj8c4a upe+0sxqVlbgpsXEpnO5UrWBhei3tvTABrJfoT8nvT1O512/NLrZ4r1MZGrPA0Ay+8Tyt tuRuY0BHtI502HaOhLqm0/0u5oJwkU+jvA8ukBa77nDhKuGgqpjnBgpqYLbP+/eUuFw== 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=A2anQtpt; 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 7066B606A32C for ; Thu, 3 Dec 2026 21:39:50 +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=A2anQtpt Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA2131F0092C; Thu, 3 Dec 2026 21:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796333989; bh=16DXNNsrBP01S/GniP3JOZvaLhKXJp1FVFZDau81fRc=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=A2anQtptC2nRFF6Lf1f+oo3Frr7SBeIsJRAoskgCt8XKwwmWnxuf8bqcdA6gOZzoZ QjLF9/vFMeyShqzZTwQs/BO94eIiA6KLs0XBu37G1CffMQQ6l9aPnCUZCUdWDM19A0 dXfUuYv0H8h3UZ4XT+j9uvC/M+pvpdTB1o+HomgIG6aWuFpBvsBApoUCxyPfOuCA1n 9eXxTGkl2zHzmN4PsBgszgJoGS5eJldL9gnNucmQBFYCsnl8g6YKr9sHC4Aa0bwpOt 8CQVymLpumCLYALotdRjtKfQjdlkLK3/Z990z9eqUX/nIu664NkxdbUYePDF2p2ztx TVEKms/c/1uXQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] drm/virtio: Reset device before deleting virtqueues on init failure Reply-To: sashiko-reviews@lists.linux.dev To: "Yuho Choi" Cc: dri-devel@lists.freedesktop.org, virtualization@lists.linux.dev, "Michael S. Tsirkin" , "Eugenio Perez" In-Reply-To: <20261203212127.2147347-2-oss.patchbox@gmail.com> References: <20261203212127.2147347-2-oss.patchbox@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 21:39:49 +0000 X-Mailing-List: virtualization@lists.linux.dev 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] drm/virtio: redundant double virtio_reset_device() in virtio_gpu_init() -- commit 4d07ab1dc65a97542b38fd22d37c228f75391c94 Author: Yuho Choi drm/virtio: Reset device before deleting virtqueues on init failure This commit adds a virtio_reset_device() call in the err_vbufs error path of virtio_gpu_init() so the device is reset before deleting virtqueues when virtio_gpu_alloc_vbufs() or virtio_gpu_modeset_init() fails. > diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virti= o/virtgpu_kms.c > index 1d4d3bf46a202..c729545e41f52 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_kms.c > +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c > @@ -326,6 +326,7 @@ int virtio_gpu_init(struct virtio_device *vdev, struc= t drm_device *dev) > err_scanouts: > virtio_gpu_free_vbufs(vgdev); > err_vbufs: > + virtio_reset_device(vgdev->vdev); > vgdev->vdev->config->del_vqs(vgdev->vdev); > err_vqs: > dev->dev_private =3D NULL; [Severity: Low] Does the err_reset_device unwind path now call virtio_reset_device() twice? When waiting for display info times out, virtio_gpu_init() jumps to err_reset_device, calls virtio_reset_device(), and falls through into err_vbufs to reset the device again before del_vqs(). The second call repeats the transport reset and virtio_synchronize_cbs() unnecessarily. Skipping the second virtio_reset_device() on the err_reset_device path by jumping directly to del_vqs() after virtio_gpu_free_vbufs() would avoid the redundant reset. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203212127.2147= 347-2-oss.patchbox@gmail.com?part=3D1