patch 'net/memif: fix crash with Tx burst larger than 255' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Tue Mar 5 10:47:02 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/31/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=9cf299a8738c63a463f0a4dbfcda83dd0af67f6b

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 9cf299a8738c63a463f0a4dbfcda83dd0af67f6b Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong at arm.com>
Date: Tue, 5 Dec 2023 04:05:24 +0000
Subject: [PATCH] net/memif: fix crash with Tx burst larger than 255
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit d8d91d78fef8a9814f918ea40a487646da83d202 ]

There will be a segfault when Tx burst size is larger than 256.
This is because eth_memif_tx uses an index i which is uint8_t to count
transmitted nb_pkts.
Extend i to uint16_t, the same size as nb_pkts.

Fixes: b5613c8f9d0a ("net/memif: add a Tx fast path")

Reported-by: Liangxing Wang <liangxing.wang at arm.com>
Signed-off-by: Joyce Kong <joyce.kong at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 .mailmap                          | 1 +
 drivers/net/memif/rte_eth_memif.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index bff68cefd8..540a3caab7 100644
--- a/.mailmap
+++ b/.mailmap
@@ -788,6 +788,7 @@ Lewei Yang <leweix.yang at intel.com>
 Leyi Rong <leyi.rong at intel.com>
 Liang Ma <liangma at bytedance.com> <liangma at liangbit.com> <liang.j.ma at intel.com>
 Liang-Min Larry Wang <liang-min.wang at intel.com>
+Liangxing Wang <liangxing.wang at arm.com>
 Liang Xu <liang.xu at cinfotech.cn>
 Liang Zhang <zhangliang at bigo.sg>
 Li Feng <fengli at smartx.com>
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 7cc8c0da91..6f45a00172 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -684,7 +684,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		n_free = __atomic_load_n(&ring->head, __ATOMIC_ACQUIRE) - slot;
 	}

-	uint8_t i;
+	uint16_t i;
 	struct rte_mbuf **buf_tmp = bufs;
 	mbuf_head = *buf_tmp++;
 	struct rte_mempool *mp = mbuf_head->pool;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.446874582 +0800
+++ 0081-net-memif-fix-crash-with-Tx-burst-larger-than-255.patch	2024-03-05 17:39:30.823566495 +0800
@@ -1 +1 @@
-From d8d91d78fef8a9814f918ea40a487646da83d202 Mon Sep 17 00:00:00 2001
+From 9cf299a8738c63a463f0a4dbfcda83dd0af67f6b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit d8d91d78fef8a9814f918ea40a487646da83d202 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -25 +27 @@
-index dd3a4f7529..297da3b426 100644
+index bff68cefd8..540a3caab7 100644
@@ -28 +30 @@
-@@ -789,6 +789,7 @@ Lewei Yang <leweix.yang at intel.com>
+@@ -788,6 +788,7 @@ Lewei Yang <leweix.yang at intel.com>


More information about the stable mailing list