linux/drivers/vhost
zhang jiao cfa0654402 vhost: vringh: Modify the return value check
[ Upstream commit 82a8d0fda5 ]

The return value of copy_from_iter and copy_to_iter can't be negative,
check whether the copied lengths are equal.

Fixes: 309bba39c9 ("vringh: iterate on iotlb_translate to handle large translations")
Cc: "Stefano Garzarella" <sgarzare@redhat.com>
Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Message-Id: <20250910091739.2999-1-zhangjiao2@cmss.chinamobile.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-10-15 12:04:14 +02:00
..
iotlb.c vhost_iotlb: split out IOTLB initialization 2022-05-31 12:44:28 -04:00
Kconfig vhost: Reintroduce kthread API and add mode selection 2025-08-01 09:11:09 -04:00
Makefile vhost: introduce vDPA-based backend 2020-04-02 10:41:40 -04:00
net.c vhost-net: flush batched before enabling notifications 2025-09-19 04:15:26 -04:00
scsi.c vhost-scsi: fix argument order in tport allocation error message 2025-09-15 18:25:58 -04:00
test.c vhost-test: remove meaningless debug info 2023-02-20 19:26:58 -05:00
test.h tools/virtio: Add --reset 2020-06-22 12:34:21 -04:00
vdpa.c irqbypass: Require producers to pass in Linux IRQ number during registration 2025-06-20 13:52:41 -07:00
vhost.c vhost: initialize vq->nheads properly 2025-08-05 05:57:40 -04:00
vhost.h virtio, vhost: features, fixes 2025-08-01 14:17:48 -07:00
vringh.c vhost: vringh: Modify the return value check 2025-10-15 12:04:14 +02:00
vsock.c vsock/virtio: Rename virtio_vsock_skb_rx_put() 2025-08-01 09:11:09 -04:00