patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/2] net/cxgbe: fix overlapping regions in TID table
       [not found] <cover.1544813681.git.rahul.lakkireddy@chelsio.com>
@ 2018-12-14 19:01 ` Rahul Lakkireddy
  2018-12-14 19:01 ` [dpdk-stable] [PATCH 2/2] net/cxgbe: skip parsing match items with no spec Rahul Lakkireddy
  1 sibling, 0 replies; 2+ messages in thread
From: Rahul Lakkireddy @ 2018-12-14 19:01 UTC (permalink / raw)
  To: dev; +Cc: nirranjan, indranil, stable

Location of filter TID table should be after active TID table memory,
and not from the beginning of TID table memory. This fixes memory
corruption due to overlapping regions.

Fixes: 3a381a4116ed ("net/cxgbe: query firmware for HASH filter resources")
Cc: stable@dpdk.org

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 0368db509..5fa6cdd05 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -415,7 +415,7 @@ static int tid_init(struct tid_info *t)
 		return -ENOMEM;
 
 	t->atid_tab = (union aopen_entry *)&t->tid_tab[t->ntids];
-	t->ftid_tab = (struct filter_entry *)&t->tid_tab[t->natids];
+	t->ftid_tab = (struct filter_entry *)&t->atid_tab[t->natids];
 	t->ftid_bmap_array = t4_os_alloc(ftid_bmap_size);
 	if (!t->ftid_bmap_array) {
 		tid_free(t);
-- 
2.18.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dpdk-stable] [PATCH 2/2] net/cxgbe: skip parsing match items with no spec
       [not found] <cover.1544813681.git.rahul.lakkireddy@chelsio.com>
  2018-12-14 19:01 ` [dpdk-stable] [PATCH 1/2] net/cxgbe: fix overlapping regions in TID table Rahul Lakkireddy
@ 2018-12-14 19:01 ` Rahul Lakkireddy
  1 sibling, 0 replies; 2+ messages in thread
From: Rahul Lakkireddy @ 2018-12-14 19:01 UTC (permalink / raw)
  To: dev; +Cc: nirranjan, indranil, stable

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-14 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1544813681.git.rahul.lakkireddy@chelsio.com>
2018-12-14 19:01 ` [dpdk-stable] [PATCH 1/2] net/cxgbe: fix overlapping regions in TID table Rahul Lakkireddy
2018-12-14 19:01 ` [dpdk-stable] [PATCH 2/2] net/cxgbe: skip parsing match items with no spec Rahul Lakkireddy

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).