Re: [PATCH] vhost: vringh: Modify the return value check

Michael S. Tsirkin
2025-09-21T20:59:39Z

On Wed, Sep 10, 2025 at 05:17:38PM +0800, zhangjiao2 wrote:
> From: zhang jiao <zhangjiao2@cmss.chinamobile.com>
>
> The return value of copy_from_iter and copy_to_iter can't be negative,
> check whether the copied lengths are equal.
>
> Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>

Well I don't see a fix for copy_to_iter here.

ret = copy_to_iter(src, translated, &iter);
if (ret < 0)
return ret;