git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2728821
)
net/cxgbe: skip parsing match items with no spec
author
Rahul Lakkireddy
<rahul.lakkireddy@chelsio.com>
Fri, 14 Dec 2018 19:01:54 +0000
(
00:31
+0530)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Fri, 21 Dec 2018 15:22:40 +0000
(16:22 +0100)
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
patch
|
blob
|
history
diff --git
a/drivers/net/cxgbe/cxgbe_flow.c
b/drivers/net/cxgbe/cxgbe_flow.c
index
4deaff8
..
7b87bdf
100644
(file)
--- 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)