All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	"zhang jiao" <zhangjiao2@cmss.chinamobile.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	kvm@vger.kernel.org, virtualization@lists.linux.dev,
	netdev@vger.kernel.org
Subject: Re: [PATCH net] vhost: vringh: Fix copy_to_iter return value check
Date: Fri, 26 Sep 2025 10:51:57 +0100	[thread overview]
Message-ID: <aNZiPbINQWoJA_-w@horms.kernel.org> (raw)
In-Reply-To: <cd637504a6e3967954a9e80fc1b75e8c0978087b.1758723310.git.mst@redhat.com>

On Thu, Sep 25, 2025 at 02:04:08AM -0400, Michael S. Tsirkin wrote:
> The return value of copy_to_iter can't be negative, check whether the
> copied length is equal to the requested length instead of checking for
> negative values.
> 
> Cc: zhang jiao <zhangjiao2@cmss.chinamobile.com>
> Link: https://lore.kernel.org/all/20250910091739.2999-1-zhangjiao2@cmss.chinamobile.com
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Hi Michael,

As a patch for net, I think it would be nice to include a fixes tag.
Perhaps:

Fixes: 309bba39c945 ("vringh: iterate on iotlb_translate to handle large translations")

And nicer still to include some description of the failure scenario.

In any case, the code change looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>

  reply	other threads:[~2025-09-26  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-25  6:04 [PATCH net] vhost: vringh: Fix copy_to_iter return value check Michael S. Tsirkin
2025-09-26  9:51 ` Simon Horman [this message]
2025-09-27  0:50 ` patchwork-bot+netdevbpf
2025-10-01 11:22   ` Michael S. Tsirkin
2025-10-01 14:00     ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aNZiPbINQWoJA_-w@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux.dev \
    --cc=zhangjiao2@cmss.chinamobile.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.