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=1796261254; b=tt0DeLeOaRW1xD0Uz1X+obsIEMSTEBkYMFakGTL1y3UE8cMkwydvBmmQ9GvNvi8CWegR pV99IkdMGlezCQTyPoXhV3GG5NIeZtdBbTE2vKxeaJXBWCJ30MeJtbbDhVj4eezlUMV9B yKJoxmBL7PgmtsxccjJagPcQsgRPttCWwtseZBZMhAUnjjbhPEjV78lYZp1WYMKfZQJmU s7JoYLZmSVaZhtStyJHd0j/uGIKzL/hlUKhxPbTxfWAFLbIQi0ujdAlpOqbLKvD10B+bh 7FKHP6XL811QnmWxLKpqyPW7/1bh40BSjpf6dN5dMqPdsrW7Dx/5XTwtYe173gn+E8w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796261254; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=WJnBaWA06Cph5yI26KWI3OtzH0Mn6XuF7Eh/WnorFWM=; b=Vk3D7X31TQ7Q4nJIC1zUQb9993mOMQSGMcQHUVmrJoRL/J+dh8os95oaQl11R4QUVx6Z nuco8FH6UGcHGzLBZXvVHWtsstgr4z/8f7vExn5cFxEeNEU8itKDhrwX2FbUh2Pt3yS+t ZzDS3WjzztgwUZZDxapdnIBskfdKyA1qUT+GolW/I1cGvv8nKMotALZgnCVdoNlz1mil3 NvnK24tQnnEpsvs51POaYACGhpV0C0WognuSXUm2u+M7lREvd7aHQ7SboqHRCB5z1yX1S LcT+301QPVJ1WZ0/yn0l9gkw75pzPQckRNw+eaor35BvmnAIneZDxAqQoW6n38ibzfQ== 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="A/B2OUlr"; 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 BB5ED606A322 for ; Thu, 3 Dec 2026 01:27:33 +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=A/B2OUlr Received: by smtp.kernel.org (Postfix) with ESMTPSA id 853FE1F000C1; Thu, 3 Dec 2026 01:27:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796261253; bh=WJnBaWA06Cph5yI26KWI3OtzH0Mn6XuF7Eh/WnorFWM=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=A/B2OUlrONg3Luo85qgE/FXfQ0oxou9/GJeh8KnltQgpg+h6wVw3PgCr2kwDd+wiQ +YjcSV8rcsWcTGf+pkuBudMJIZlHM6JK7VAuy4qwLEVdeunV6r3UxS9Q1MLXoUVAgq xSv58fe1K5NyraQqCgJGObgd/sbTKUXmAnL7ewHspp/jps0VZ3Xky0iNdlZQV1fZU7 529vIHhrBCJy8MBrRDkuB5qXMEQ9L+7VI/F6zGG3WPZxL1BCjQTANxVhZIR1lNcLW/ GWSfrhVNi6PXNdlPsZ9qNWsJWNix68TKhPez9cuisuSEdgnitL2mCPvUZuk3xL+rmN hO1NNSrhSSsOg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] virtio_input: clear the virtqueue pointers on freeze Reply-To: sashiko-reviews@lists.linux.dev To: "Mingbing Zhai" Cc: virtualization@lists.linux.dev, "Michael S. Tsirkin" , "Eugenio Perez" In-Reply-To: <20261203012445.1202-1-zhaimingbing@cmss.chinamobile.com> References: <20261203012445.1202-1-zhaimingbing@cmss.chinamobile.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 01:27:33 +0000 X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > virtinput_freeze() tears down the virtqueues with del_vqs() but > leaves vi->evt and vi->sts pointing at the freed memory. If the > resume then fails (virtio_find_vqs() in virtinput_restore() fails), > the driver stays bound and the next freeze or remove uses the freed > queues in virtqueue_detach_unused_buf() and calls del_vqs() a second > time -- on virtio-mmio that also frees the same IRQs again. >=20 > Factor the detach and del_vqs() into virtinput_del_vqs(), clear the > pointers after the queues are gone, and make it a no-op once they > are. This mirrors the hwrng (0f7bf47f5a0c) and vsock (2a24ba1694f1) > fixes for a failed restore. >=20 > Fixes: 271c865161c5 ("Add virtio-input driver.") > Fixes: 528d92bfc093 ("virtio_input: Improve freeze handling") > Cc: stable@vger.kernel.org > Signed-off-by: Mingbing Zhai Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203012445.1202= -1-zhaimingbing@cmss.chinamobile.com?part=3D1