[dpdk-stable] patch 'app/bbdev: check memory allocation' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Sat Jun 12 01:03:01 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/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/90ca87dd693b18c69449075c447911f42827289d

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 90ca87dd693b18c69449075c447911f42827289d Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29 at huawei.com>
Date: Thu, 22 Apr 2021 17:25:05 +0800
Subject: [PATCH] app/bbdev: check memory allocation
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit bc4c9418ee0fc22c480c236846af7fbad923ba89 ]

Return value of a function 'rte_malloc' is dereferenced without
checking, and may result in segmentation fault.

This patch fixed it.

Fixes: 31a7853d1ed9 ("baseband/turbo_sw: support large size code block")

Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
Acked-by: Nicolas Chautru <nicolas.chautru at intel.com>
---
 app/test-bbdev/test_bbdev_perf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 59b37ede4a..622ba70c67 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -957,6 +957,9 @@ init_op_data_objs(struct rte_bbdev_op_data *bufs,
 			if ((op_type == DATA_INPUT) && large_input) {
 				/* Allocate a fake overused mbuf */
 				data = rte_malloc(NULL, seg->length, 0);
+				TEST_ASSERT_NOT_NULL(data,
+					"rte malloc failed with %u bytes",
+					seg->length);
 				memcpy(data, seg->addr, seg->length);
 				m_head->buf_addr = data;
 				m_head->buf_iova = rte_malloc_virt2iova(data);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.844915700 +0800
+++ 0087-app-bbdev-check-memory-allocation.patch	2021-06-12 06:53:56.410000000 +0800
@@ -1 +1 @@
-From bc4c9418ee0fc22c480c236846af7fbad923ba89 Mon Sep 17 00:00:00 2001
+From 90ca87dd693b18c69449075c447911f42827289d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit bc4c9418ee0fc22c480c236846af7fbad923ba89 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 45b85b984c..f94e2a94d0 100644
+index 59b37ede4a..622ba70c67 100644


More information about the stable mailing list