DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <beilei.xing@intel.com>, <jia.guo@intel.com>
Subject: [dpdk-dev] [PATCH 1/2] net/i40e: fix veb index negative was not checked
Date: Wed, 21 Apr 2021 10:33:13 +0800	[thread overview]
Message-ID: <1618972394-14045-2-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1618972394-14045-1-git-send-email-humin29@huawei.com>

From: Chengwen Feng <fengchengwen@huawei.com>

This patch adds checking for veb index negative when parsing veb list.

Fixes: 79f2248219c0 (net/i40e: add floating VEB option)
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/i40e/i40e_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index e6206a7..c897c81 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -854,6 +854,8 @@ floating_veb_list_handler(__rte_unused const char *key,
 		idx = strtoul(floating_veb_value, &end, 10);
 		if (errno || end == NULL)
 			return -1;
+		if (idx < 0)
+			return -1;
 		while (isblank(*end))
 			end++;
 		if (*end == '-') {
-- 
2.7.4


  reply	other threads:[~2021-04-21  2:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21  2:33 [dpdk-dev] [PATCH 0/2] fixes for i40e PMD Min Hu (Connor)
2021-04-21  2:33 ` Min Hu (Connor) [this message]
2021-04-22 13:17   ` [dpdk-dev] [PATCH 1/2] net/i40e: fix veb index negative was not checked Zhang, Qi Z
2021-04-21  2:33 ` [dpdk-dev] [PATCH 2/2] net/i40e: remove redundant judgment Min Hu (Connor)
2021-04-22 13:21   ` Zhang, Qi Z

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=1618972394-14045-2-git-send-email-humin29@huawei.com \
    --to=humin29@huawei.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jia.guo@intel.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).