DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yogesh Jangra <yogesh.jangra@intel.com>
To: dev@dpdk.org
Cc: cristian.dumitrescu@intel.com, venkata.suresh.kumar.p@intel.com,
	yogesh.jangra@intel.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] pipeline: fix instruction label check
Date: Wed, 20 Oct 2021 23:23:32 -0400	[thread overview]
Message-ID: <1634786612-115588-1-git-send-email-yogesh.jangra@intel.com> (raw)

The instruction_data array was incorrectly indexed, which resulted in
the array index getting out of bounds and sometimes segfault.

Fixes: a1711f (“pipeline: add SWX Rx and extract instructions“)
Cc: stable@dpdk.org

Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/pipeline/rte_swx_pipeline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
index 1cd09a4..0550560 100644
--- a/lib/pipeline/rte_swx_pipeline.c
+++ b/lib/pipeline/rte_swx_pipeline.c
@@ -5983,7 +5983,7 @@ struct_field_parse(struct rte_swx_pipeline *p,
 			continue;
 
 		for (j = i + 1; j < n_instructions; j++)
-			CHECK(strcmp(label, data[j].label), EINVAL);
+			CHECK(strcmp(label, instruction_data[j].label), EINVAL);
 	}
 
 	/* Get users for each instruction label. */
-- 
1.8.3.1


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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21  3:23 Yogesh Jangra [this message]
2021-10-25 12:06 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

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=1634786612-115588-1-git-send-email-yogesh.jangra@intel.com \
    --to=yogesh.jangra@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=venkata.suresh.kumar.p@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).