linux/drivers/vhost
zhang jiao baa37b1c7e 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:00:20 +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-15 12:13:58 +02: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:31:44 +02:00
scsi.c vhost-scsi: Fix log flooding with target does not exist errors 2025-08-15 12:13:58 +02: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 vhost_vdpa: assign irq bypass producer token correctly 2024-09-10 02:51:47 -04:00
vhost.c vhost: fail early when __vhost_add_used() fails 2025-08-20 18:30:40 +02:00
vhost.h vhost: Reintroduce kthread API and add mode selection 2025-08-15 12:13:58 +02:00
vringh.c vhost: vringh: Modify the return value check 2025-10-15 12:00:20 +02:00
vsock.c vhost/vsock: Avoid allocating arbitrarily-sized SKBs 2025-08-28 16:30:59 +02:00