From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: dev@dpdk.org
Cc: nirranjan@chelsio.com, indranil@chelsio.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 2/2] net/cxgbe: skip parsing match items with no spec
Date: Sat, 15 Dec 2018 00:31:54 +0530 [thread overview]
Message-ID: <361cf24699f7976d5b03fa5833ce19db7237bfd3.1544813681.git.rahul.lakkireddy@chelsio.com> (raw)
In-Reply-To: <cover.1544813681.git.rahul.lakkireddy@chelsio.com>
In-Reply-To: <cover.1544813681.git.rahul.lakkireddy@chelsio.com>
Skip parsing pattern match items that have no spec. This fixes NULL
dereference when accessing their non-existent spec.
Fixes: ee61f5113b17 ("net/cxgbe: parse and validate flows")
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
drivers/net/cxgbe/cxgbe_flow.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 4deaff8f2..7b87bdf58 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -732,6 +732,10 @@ cxgbe_rtef_parse_items(struct rte_flow *flow,
"parse items cannot be repeated (except void)");
repeat[i->type] = 1;
+ /* No spec found for this pattern item. Skip it */
+ if (!i->spec)
+ break;
+
/* validate the item */
ret = cxgbe_validate_item(i, e);
if (ret)
--
2.18.0
next prev parent reply other threads:[~2018-12-14 19:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 19:01 [dpdk-dev] [PATCH 0/2] net/cxgbe: rte_flow related bug fixes Rahul Lakkireddy
2018-12-14 19:01 ` [dpdk-dev] [PATCH 1/2] net/cxgbe: fix overlapping regions in TID table Rahul Lakkireddy
2018-12-14 19:01 ` Rahul Lakkireddy [this message]
2018-12-18 18:39 ` [dpdk-dev] [PATCH 0/2] net/cxgbe: rte_flow related bug fixes Ferruh Yigit
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=361cf24699f7976d5b03fa5833ce19db7237bfd3.1544813681.git.rahul.lakkireddy@chelsio.com \
--to=rahul.lakkireddy@chelsio.com \
--cc=dev@dpdk.org \
--cc=indranil@chelsio.com \
--cc=nirranjan@chelsio.com \
--cc=stable@dpdk.org \
/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).