[dpdk-stable] patch 'app/testpmd: fix memory failure handling for i40e DDP' has been queued to LTS release 18.11.9

Kevin Traynor ktraynor at redhat.com
Fri Jun 5 20:24:36 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.9

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/10/20. 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/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ae339eaf191361f241e27085acb27c9d2a22f8a1

Thanks.

Kevin.

---
>From ae339eaf191361f241e27085acb27c9d2a22f8a1 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Fri, 8 May 2020 10:20:24 +0530
Subject: [PATCH] app/testpmd: fix memory failure handling for i40e DDP

[ upstream commit 489bdbbfc269c819ec679605d1f0e8ad058789f4 ]

In cmd_ddp_get_list_parsed(), elements of "p_list" are accessed
even after the memory allocation for "p_list" fails.

With this patch, this null pointer dereference is avoided as we
return when there is malloc failure.

Fixes: e088907bb851 ("app/testpmd: add command for getting loaded DDP profiles")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Acked-by: Bernard Iremonger <bernard.iremonger at intel.com>
---
 app/test-pmd/cmdline.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2913de68f4..abf803418c 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16460,6 +16460,8 @@ cmd_ddp_get_list_parsed(
 	size = PROFILE_INFO_SIZE * MAX_PROFILE_NUM + 4;
 	p_list = (struct rte_pmd_i40e_profile_list *)malloc(size);
-	if (!p_list)
+	if (!p_list) {
 		printf("%s: Failed to malloc buffer\n", __func__);
+		return;
+	}
 
 	if (ret == -ENOTSUP)
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-06-05 19:20:52.985239100 +0100
+++ 0039-app-testpmd-fix-memory-failure-handling-for-i40e-DDP.patch	2020-06-05 19:20:50.815040700 +0100
@@ -1 +1 @@
-From 489bdbbfc269c819ec679605d1f0e8ad058789f4 Mon Sep 17 00:00:00 2001
+From ae339eaf191361f241e27085acb27c9d2a22f8a1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 489bdbbfc269c819ec679605d1f0e8ad058789f4 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index b040630c54..996a498768 100644
+index 2913de68f4..abf803418c 100644
@@ -25 +26 @@
-@@ -16892,6 +16892,8 @@ cmd_ddp_get_list_parsed(
+@@ -16460,6 +16460,8 @@ cmd_ddp_get_list_parsed(



More information about the stable mailing list