]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vhost: vringh: Modify the return value check
authorzhang jiao <zhangjiao2@cmss.chinamobile.com>
Wed, 10 Sep 2025 09:17:38 +0000 (17:17 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 1 Oct 2025 11:24:20 +0000 (07:24 -0400)
commit82a8d0fda55b35361ee7f35b54fa2b66d7847d2b
treeef4cde9fa2934f45172dd344554621db816802b7
parente5f0a698b34ed76002dc5cff3804a61c80233a7a
vhost: vringh: Modify the return value check

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

Fixes: 309bba39c945 ("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>
drivers/vhost/vringh.c