From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Yunjian Wang <wangyunjian@huawei.com>, dev@dpdk.org
Cc: chenbox@nvidia.com, jerry.lilijun@huawei.com, stable@dpdk.org
Subject: Re: [PATCH 1/1] vhost: fix missing gso_size validity check
Date: Mon, 13 Jan 2025 16:30:26 +0100 [thread overview]
Message-ID: <f3c0d070-5d01-42a5-8db9-14f62d6718aa@redhat.com> (raw)
In-Reply-To: <6d3c97d4be3a43a45e9435478015f1ec546b14b6.1734663422.git.wangyunjian@huawei.com>
Hi,
In the title: s/gso_size/GSO size/
On 12/20/24 4:45 AM, Yunjian Wang wrote:
> The value of tso_segsz cannot be 0, instead check that value of
> gso_size was set.
>
> Fixes: d0cf91303d73 ("vhost: add Tx offload capabilities")
> Cc: stable@dpdk.org
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
> lib/vhost/virtio_net.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
> index 69901ab3b5..2ac5bc29a3 100644
> --- a/lib/vhost/virtio_net.c
> +++ b/lib/vhost/virtio_net.c
> @@ -2733,6 +2733,9 @@ vhost_dequeue_offload_legacy(struct virtio_net *dev, struct virtio_net_hdr *hdr,
> }
>
> if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
> + if (hdr->gso_size == 0)
> + goto error;
> +
> switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {
> case VIRTIO_NET_HDR_GSO_TCPV4:
> case VIRTIO_NET_HDR_GSO_TCPV6:
With the title amended, the patch looks good to me:
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
No need to send a new version, I can fix the title while applying.
Thanks,
Maxime
prev parent reply other threads:[~2025-01-13 15:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 3:45 Yunjian Wang
2025-01-13 15:30 ` Maxime Coquelin [this message]
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=f3c0d070-5d01-42a5-8db9-14f62d6718aa@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=chenbox@nvidia.com \
--cc=dev@dpdk.org \
--cc=jerry.lilijun@huawei.com \
--cc=stable@dpdk.org \
--cc=wangyunjian@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).