linux/drivers/vhost
zhang jiao db042925a5 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 11:56:39 +02:00
..
iotlb.c vhost_iotlb: split out IOTLB initialization 2022-05-31 12:44:28 -04:00
Kconfig vhost_vdpa: implement IRQ offloading in vhost_vdpa 2020-08-05 11:08:42 -04:00
Makefile vhost: introduce vDPA-based backend 2020-04-02 10:41:40 -04:00
net.c vhost/net: Protect ubufs with rcu read lock in vhost_net_ubuf_put() 2025-09-04 15:26:26 +02:00
scsi.c vhost-scsi: Fix log flooding with target does not exist errors 2025-08-15 12:05:05 +02:00
test.c vhost: rename vhost_work_dev_flush 2022-05-31 12:45:10 -04:00
test.h tools/virtio: Add --reset 2020-06-22 12:34:21 -04:00
vdpa.c vhost_vdpa: assign irq bypass producer token correctly 2024-10-17 15:21:12 +02:00
vhost.c vhost: fail early when __vhost_add_used() fails 2025-08-28 16:25:59 +02:00
vhost.h vhost: support PACKED when setting-getting vring_base 2023-06-14 11:15:33 +02:00
vringh.c vhost: vringh: Modify the return value check 2025-10-15 11:56:39 +02:00
vsock.c vhost/vsock: Avoid allocating arbitrarily-sized SKBs 2025-08-28 16:26:07 +02:00