patch 'eventdev/eth_tx: fix queue delete logic' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Sun Nov 28 15:53:33 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4f17d46380ff62b353e1d08cf15754239009ab4e

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 4f17d46380ff62b353e1d08cf15754239009ab4e Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k at intel.com>
Date: Tue, 9 Nov 2021 01:33:33 -0600
Subject: [PATCH] eventdev/eth_tx: fix queue delete logic
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 741b499e6421ff93542d17c57f536b9d8e9bb443 ]

This patch fixes heap-use-after-free reported by ASan.

The application can use the queue_id as `-1` to delete all
the queues of the eth_device that are added to tx_adapter
instance.
In above case, the queue_del API is trying to use number of
queues from adapter level instead of eth_device queues.
When there are queues added from multiple eth devices,
it will result in heap-use-after-free as reported by ASAN.

This patch fixes the queue_del API to use correct number of
queues.

Bugzilla ID: 869
Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k at intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan at intel.com>
Tested-by: David Marchand <david.marchand at redhat.com>
---
 lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index a122750fd9..2684eb4308 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -818,7 +818,7 @@ txa_service_queue_del(uint8_t id,
 		uint16_t i, q, nb_queues;
 		int ret = 0;
 
-		nb_queues = txa->nb_queues;
+		nb_queues = txa->txa_ethdev[port_id].nb_queues;
 		if (nb_queues == 0)
 			return 0;
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.907296563 +0800
+++ 0029-eventdev-eth_tx-fix-queue-delete-logic.patch	2021-11-28 22:41:03.243542368 +0800
@@ -1 +1 @@
-From 741b499e6421ff93542d17c57f536b9d8e9bb443 Mon Sep 17 00:00:00 2001
+From 4f17d46380ff62b353e1d08cf15754239009ab4e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 741b499e6421ff93542d17c57f536b9d8e9bb443 ]
@@ -21 +23,0 @@
-Cc: stable at dpdk.org
@@ -27 +29 @@
- lib/eventdev/rte_event_eth_tx_adapter.c | 2 +-
+ lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
@@ -30,5 +32,5 @@
-diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
-index da55d2c2dc..c17f33f098 100644
---- a/lib/eventdev/rte_event_eth_tx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
-@@ -864,7 +864,7 @@ txa_service_queue_del(uint8_t id,
+diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+index a122750fd9..2684eb4308 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+@@ -818,7 +818,7 @@ txa_service_queue_del(uint8_t id,


More information about the stable mailing list